hellopeterlee / laravel-uploader
v0.1.2
2020-10-21 07:11 UTC
Requires
- php: >=5.5.9
- intervention/image: ^2.4
This package is auto-updated.
Last update: 2025-04-21 17:31:01 UTC
README
🌴 An upload component that allows you to save more time playing LOL.
Installing
-
register provider and configuration.
$ composer require hellopeterlee/laravel-uploader -vvv
then register the package service provider, add the following line to
providers
section ofconfig/app.php
:PeterLee\Scaffold\UploadServiceProvider::class,
and publish the assets using command:
$ php artisan vendor:publish --provider=HelloPeterlee\\LaravelUploader\\UploadServiceProvider
-
Routing
You can register routes in
routes/web.php
or other routes file:\LaravelUploader::routes();
Usage
-
Add the uploader component to right position of your form:
@uploader('images')
or assign form name:
@uploader('images', ['name' => 'images'])
or set max files:
@uploader('images', ['max' => 10])
and strategy (default: 'default'):
@uploader('images', ['strategy' => 'avatar'])
-
Don't forget import uploader assets at the end of your template:
@uploader('assets')
License
MIT