leadthread/laravel-upload
32
| Install | |
|---|---|
composer require leadthread/laravel-upload |
|
| Latest Version: | 2.0.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Dec 17, 2021 |
| Links: | GitHub · Packagist |
Maintainer: tylercd100
laravel-upload
Installation
Install via composer - In the terminal:
composer require leadthread/laravel-upload
Now add the following to the providers array in your config/app.php
LeadThread\Upload\Providers\Upload::class
and this to the aliases array in config/app.php
"Upload" => "LeadThread\Upload\Facades\Upload",
Then you will need to run these commands in the terminal in order to copy the config and migration files
php artisan vendor:publish --provider="LeadThread\Upload\Providers\Upload"
Before you run the migration you may want to take a look at config/upload.php and change the table property to a table name that you would like to use. After that run the migration
php artisan migrate
Usage
To save the file to the disk and database:
function upload(Request $request)
{
$file = $request->file('file');
//Returns an Eloquent Model for the file
$model = Upload::create($file);
}
Contributing
Contributions are always welcome!
Related Packages
ont/laravel-uploader
Implementation of Ont\Interfaces\Uploader which saves files in local filesystem.
1,062
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 2.0.0 | ^5.2.41 | MIT | |
| 1.1.0 | ^5.2.41 | MIT | |
| 1.0.3 | ^5.2.41 | MIT | |
| 1.0.2 | ^5.2.41 | MIT | |
| 1.0.1 | ^5.2.41 | MIT | |
| 1.0.0 | ^5.2.41 | MIT | |
| 0.0.2 | ^5.2.41 | MIT | |
| 0.0.1 | MIT |

