- Added Spatie Media Library - Added media library configuration file - Updated Entry model to support media handling - Added featured image upload with gallery selection and preview - Added login tests with Dusk for user authentication - Added Dusk test for featured image selection Co-authored-by: jon brookes <marshyon@gmail.com> Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/4
42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Entries\Schemas;
|
|
|
|
use Filament\Infolists\Components\IconEntry;
|
|
use Filament\Infolists\Components\SpatieMediaLibraryImageEntry;
|
|
use Filament\Infolists\Components\TextEntry;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class EntryInfolist
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextEntry::make('title'),
|
|
TextEntry::make('slug'),
|
|
TextEntry::make('description')
|
|
->placeholder('-')
|
|
->columnSpanFull(),
|
|
SpatieMediaLibraryImageEntry::make('featured_image')
|
|
->collection('featured-image')
|
|
->columnSpanFull(),
|
|
IconEntry::make('is_published')
|
|
->boolean(),
|
|
IconEntry::make('is_featured')
|
|
->boolean(),
|
|
TextEntry::make('published_at')
|
|
->date()
|
|
->placeholder('-'),
|
|
TextEntry::make('content')
|
|
->placeholder('-')
|
|
->columnSpanFull(),
|
|
TextEntry::make('created_at')
|
|
->dateTime()
|
|
->placeholder('-'),
|
|
TextEntry::make('updated_at')
|
|
->dateTime()
|
|
->placeholder('-'),
|
|
]);
|
|
}
|
|
}
|