simple package for uploading files in laravel frame-work.
- INSTALL THE PACKAGE THROW THIS COMMAND
composer require qusai/easy-upload-files
- ADD THE SERVEICE PROVIDER IN THE
app.php
Qusai\Upload\Providers\UploadFileServiceProvider::class
- GO TO THE
filesystem.php
AND ADD THIS CODE INIT SO THE PACKAGE WILL WORK PROPERLY
'easy_file_uploader' => [
'driver' => 'local',
'root' => public_path() . '/',
'url' => env('APP_URL'). '/',
'visibility' => 'public'
]
- WHEN YOU NEED TO USE THIS PACKAGE YOU CAN CALL IT LIKE THIS
use Qusai\Upload\UploadFiles;
class className extends Controller {
...
use UploadFiles;
public function functionName(Request $request)
{
.....
$this->uplaodFile('FOLDERNAME',$request->file('FILE INPUT NAME IN THE REQUEST'));
}
}
GOOD LUCK:)