File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ public function parent(): BelongsTo
100
100
return $ this ->belongsTo (self ::class, 'parent_id ' , 'id ' );
101
101
}
102
102
103
- public function image (): Collection | string | null
103
+ public function image (string $ collection = ' posts ' ): Collection | string | null
104
104
{
105
- if (! $ this ->getMedia (' posts ' )->isEmpty ()) {
106
- return $ this ->getFirstMediaUrl (' posts ' );
105
+ if (! $ this ->getMedia ($ collection )->isEmpty ()) {
106
+ return $ this ->getFirstMediaUrl ($ collection );
107
107
} else {
108
108
return $ this ->featured_image ?? config ('zeus-sky.defaultFeaturedImage ' );
109
109
}
Original file line number Diff line number Diff line change @@ -64,11 +64,14 @@ protected function getMigrations(): array
64
64
65
65
private function bootFilamentNavigation (): void
66
66
{
67
- if (! defined ('__PHPSTAN_RUNNING__ ' ) && (! app ('filament ' )->hasPlugin ('zeus-sky ' ) || ! app ('filament ' )->hasPlugin ('navigation ' ))) {
68
- return ;
69
- }
70
-
71
67
Filament::serving (function () {
68
+ if (! defined ('__PHPSTAN_RUNNING__ ' ) &&
69
+ ! app ('filament ' )->hasPlugin ('zeus-sky ' ) &&
70
+ ! app ('filament ' )->hasPlugin ('navigation ' )
71
+ ) {
72
+ return ;
73
+ }
74
+
72
75
NavigationResource::navigationGroup (SkyPlugin::get ()->getNavigationGroupLabel ());
73
76
NavigationResource::navigationSort (999 );
74
77
NavigationResource::navigationIcon ('heroicon-o-queue-list ' );
You can’t perform that action at this time.
0 commit comments