This commit is contained in:
f4ilji
2025-01-30 00:31:40 +05:00
parent bad611eb84
commit 3385dc5807
60 changed files with 1811 additions and 825 deletions
+6
View File
@@ -10,4 +10,10 @@ class MainSlider extends Model
use HasFactory;
protected $guarded = false;
protected $casts = [
'settings' => 'array',
'image' => 'array',
];
}
+5
View File
@@ -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()
{
+1
View File
@@ -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'));
});