25 lines
647 B
PHP
25 lines
647 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Filament\Resources\Assets\Schemas;
|
||
|
|
|
||
|
|
use Filament\Forms\Components\TextInput;
|
||
|
|
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
|
||
|
|
use Filament\Schemas\Schema;
|
||
|
|
|
||
|
|
class AssetForm
|
||
|
|
{
|
||
|
|
public static function configure(Schema $schema): Schema
|
||
|
|
{
|
||
|
|
return $schema
|
||
|
|
->components([
|
||
|
|
TextInput::make('alt_text'),
|
||
|
|
SpatieMediaLibraryFileUpload::make('image')
|
||
|
|
->collection('default')
|
||
|
|
->image()
|
||
|
|
->disk('s3')
|
||
|
|
->visibility('public')
|
||
|
|
->label('Upload Image'),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|