diff --git a/routes/web.php b/routes/web.php index 47b1ef8..5d6dc64 100644 --- a/routes/web.php +++ b/routes/web.php @@ -35,6 +35,6 @@ ->name('library'); Route::middleware(config('zeus-sky.middleware')) - ->get(config('zeus-sky.library_uri_prefix').'/{slug}', \LaraZeus\Sky\Http\Livewire\LibraryItem::class) + ->get(config('zeus-sky.library_uri_prefix') . '/{slug}', \LaraZeus\Sky\Http\Livewire\LibraryItem::class) ->name('library.item'); } diff --git a/src/Filament/Resources/LibraryResource.php b/src/Filament/Resources/LibraryResource.php index 6cb1a54..62eef12 100644 --- a/src/Filament/Resources/LibraryResource.php +++ b/src/Filament/Resources/LibraryResource.php @@ -32,7 +32,7 @@ public static function getModel(): string protected static function getNavigationBadge(): ?string { - return (string)config('zeus-sky.models.library')::query()->count(); + return (string) config('zeus-sky.models.library')::query()->count(); } public static function form(Form $form): Form @@ -53,7 +53,7 @@ public static function form(Form $form): Form }), TextInput::make('slug') - ->unique(ignorable: fn(?Model $record): ?Model => $record) + ->unique(ignorable: fn (?Model $record): ?Model => $record) ->required() ->maxLength(255) ->label(__('Library Slug')), @@ -72,7 +72,6 @@ public static function form(Form $form): Form ->visible(config('zeus-sky.library_types') !== null) ->options(config('zeus-sky.library_types', null)), - Section::make(__('File')) ->schema([ Radio::make('upload_or_url') diff --git a/src/Http/Livewire/LibraryItem.php b/src/Http/Livewire/LibraryItem.php index f2af5b9..9f31a8f 100644 --- a/src/Http/Livewire/LibraryItem.php +++ b/src/Http/Livewire/LibraryItem.php @@ -3,7 +3,6 @@ namespace LaraZeus\Sky\Http\Livewire; use Livewire\Component; -use \LaraZeus\Sky\Models\Library as libraryModel; class LibraryItem extends Component { @@ -13,6 +12,7 @@ public function mount($slug) { $this->item = config('zeus-sky.models.library')::where('slug', $slug)->firstOrFail(); } + public function render() { seo()