Skip to content

Commit

Permalink
Merge branch 'media-library' of github.com:lara-zeus/sky into media-l…
Browse files Browse the repository at this point in the history
…ibrary
  • Loading branch information
atmonshi committed May 20, 2023
2 parents 9d95a48 + b09bb71 commit a76332a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
5 changes: 2 additions & 3 deletions src/Filament/Resources/LibraryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')),
Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Livewire/LibraryItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace LaraZeus\Sky\Http\Livewire;

use Livewire\Component;
use \LaraZeus\Sky\Models\Library as libraryModel;

class LibraryItem extends Component
{
Expand All @@ -13,6 +12,7 @@ public function mount($slug)
{
$this->item = config('zeus-sky.models.library')::where('slug', $slug)->firstOrFail();
}

public function render()
{
seo()
Expand Down

0 comments on commit a76332a

Please sign in to comment.