add id to guarded

This commit is contained in:
2025-05-07 14:42:22 +03:30
parent 992ddf2f66
commit 6995377b6f
9 changed files with 12 additions and 11 deletions

View File

@@ -8,5 +8,5 @@ use Illuminate\Database\Eloquent\Model;
class City extends Model
{
use HasFactory;
protected $guarded = [];
protected $guarded = ['id'];
}

View File

@@ -8,5 +8,5 @@ use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
use HasFactory;
protected $guarded = [];
protected $guarded = ['id'];
}

View File

@@ -9,5 +9,5 @@ use Spatie\Permission\Models\Permission as SpatiePermission;
class Permission extends SpatiePermission
{
use HasFactory;
protected $guarded = [];
protected $guarded = ['id'];
}

View File

@@ -8,5 +8,5 @@ use Illuminate\Database\Eloquent\Model;
class Province extends Model
{
use HasFactory;
protected $guarded = [];
protected $guarded = ['id'];
}

View File

@@ -9,5 +9,5 @@ use Spatie\Permission\Models\Role as SpatieRole;
class Role extends SpatieRole
{
use HasFactory;
protected $guarded = [];
protected $guarded = ['id'];
}

View File

@@ -13,7 +13,7 @@ class User extends Authenticatable
{
use HasFactory, Notifiable, HasRoles;
protected $guarded = [];
protected $guarded = ['id'];
protected $hidden = ['password', 'pivot'];
public string $guard_name = 'web';