1. Go to this page and download the library: Download feugene/laravel-files 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/ */
feugene / laravel-files example snippets
// ...
Feugene\Files\ServiceProvider::class,
public function store()
{
$list = app(UploadService::class)
->upload();
return [
'success' => $list->isNotEmpty(),
'files' => $list,
];
}
public function store()
{
$list = app(UploadService::class)
->setAfterAction(AfterModelAction::class)
->upload();
return [
'success' => $list->isNotEmpty(),
'files' => $list,
];
}