PHP code example of apsonex / filament-simple-file

1. Go to this page and download the library: Download apsonex/filament-simple-file library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

apsonex / filament-simple-file example snippets



use \Apsonex\FilamentSimpleFile\Form\Components\File

File::make('column')
    ->disk('s3')
    ->directory("storage/dir/location")
    ->visibility('public')
    ->acceptedFileTypes(['image/png', 'image/jpeg', 'image/jpg'])
    ->helperText('Helper Text')
    ->maxSize(5 * 1024)
    ->label('Upload Logo');
 

 File::make('column')
    ->disk('s3')
    ->deleteOldFile(true)