Changes
This commit is contained in:
@@ -10,4 +10,10 @@ class MainSlider extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = false;
|
||||
|
||||
|
||||
protected $casts = [
|
||||
'settings' => 'array',
|
||||
'image' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -34,6 +34,11 @@ class Post extends Model
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function author() : BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
|
||||
public function seo()
|
||||
{
|
||||
|
||||
@@ -94,6 +94,7 @@ class User extends Authenticatable implements FilamentUser
|
||||
{
|
||||
if (config('filament-shield.dashboard_user.enabled', false)) {
|
||||
FilamentShield::createRole(name: config('filament-shield.dashboard_user.name', 'dashboard_user'));
|
||||
FilamentShield::createRole(name: config('', 'editor'));
|
||||
static::created(function (User $user) {
|
||||
$user->assignRole(config('filament-shield.dashboard_user.name', 'dashboard_user'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user