add guarded columns to permission table
This commit is contained in:
@@ -23,7 +23,7 @@ class StoreRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => 'required|unique:permissions,name|string|max:255',
|
||||
'name_fa' => 'required|unique:permissions,name|string|max:255',
|
||||
'name_fa' => 'required|unique:permissions,name_fa|string|max:255',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CallHistory extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\CallHistoryFactory> */
|
||||
use HasFactory;
|
||||
protected $guarded = ['id'];
|
||||
|
||||
@@ -15,7 +14,7 @@ class CallHistory extends Model
|
||||
{
|
||||
$event = Event::query()->where('id', $event_id)->first();
|
||||
|
||||
self::create([
|
||||
self::query()->create([
|
||||
'call_id' => $call->id,
|
||||
'telephone_id' => $call->telephone_id,
|
||||
'caller_phone_number' => $call->caller_phone_number,
|
||||
|
||||
@@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\CategoryFactory> */
|
||||
use HasFactory;
|
||||
protected $guarded = ['id'];
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class City extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\CityFactory> */
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Event extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\EventFactory> */
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -9,4 +9,5 @@ use Spatie\Permission\Models\Permission as SpatiePermission;
|
||||
class Permission extends SpatiePermission
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Province extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\ProvinceFactory> */
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -9,4 +9,5 @@ use Spatie\Permission\Models\Role as SpatieRole;
|
||||
class Role extends SpatieRole
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ return [
|
||||
'notification_server_is_down' => 'Notification Server Is Down',
|
||||
'the_operator_is_offline' => 'The Operator Is Offline',
|
||||
'operator_could_not_connect' => 'Operator Could Not Connect',
|
||||
'combination_of_category_and_subcategory_does_not_exist' => 'Combination of Category and Subcategory Does Not Exist',
|
||||
'telephone_id_is_in_use' => 'Telephone ID Is In Use',
|
||||
];
|
||||
|
||||
@@ -9,4 +9,5 @@ return [
|
||||
'the_operator_is_offline' => 'اپراتور آفلاین است.',
|
||||
'operator_could_not_connect' => 'عدم اتصال اپراتور',
|
||||
'combination_of_category_and_subcategory_does_not_exist' => 'ترکیب موضوع و زیر موضوع نا معتبر می باشد',
|
||||
'telephone_id_is_in_use' => 'این تلفن درحال استفاده است',
|
||||
];
|
||||
|
||||
@@ -25,7 +25,7 @@ Route::prefix('server')->group(function () {
|
||||
->group(function () {
|
||||
Route::get('/info', 'info')->name('info');
|
||||
Route::post('/change_password', 'changePassword')->name('changePassword');
|
||||
Route::post('/permissions', 'permissions')->name('permissions');
|
||||
Route::get('/permissions', 'permissions')->name('permissions');
|
||||
});
|
||||
|
||||
Route::prefix('users')
|
||||
@@ -53,7 +53,7 @@ Route::prefix('server')->group(function () {
|
||||
->middleware('auth:sanctum')
|
||||
->controller(CategoryController::class)
|
||||
->group(function () {
|
||||
Route::get('/categories', 'list');
|
||||
Route::get('/list', 'list');
|
||||
});
|
||||
|
||||
Route::middleware('auth:sanctum')
|
||||
|
||||
Reference in New Issue
Block a user