PHP code example of jaysson / eloquent_filefield
1. Go to this page and download the library: Download jaysson/eloquent_filefield 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/ */
jaysson / eloquent_filefield example snippets
use Jaysson\EloquentFileField\FileFieldTrait;
public $fileFields = [
'image' => [],
'poster' => [
'disk' => app('config')->get('filesystems.default'),
'path' => 'uploads/:class_slug/:attribute/:unique_id-:file_name',
'default_path' => 'uploads/default.png'
]
];
bash
$ php artisan vendor:publish