hellopeterlee/laravel-uploader

Downloads

16

Stars

0

Version

v0.1.2

Laravel Uploader

:palm_tree: An upload component that allows you to save more time playing LOL.

Installing

  1. register provider and configuration.

    $ composer require hellopeterlee/laravel-uploader -vvv
    

    then register the package service provider, add the following line to providers section of config/app.php:

    PeterLee\Scaffold\UploadServiceProvider::class,
    

    and publish the assets using command:

    $ php artisan vendor:publish --provider=HelloPeterlee\\LaravelUploader\\UploadServiceProvider
    
  2. Routing

    You can register routes in routes/web.php or other routes file:

    \LaravelUploader::routes();
    

Usage

  1. 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'])
    
  2. Don't forget import uploader assets at the end of your template:

    @uploader('assets')
    

License

MIT

hellopeterlee

Author

hellopeterlee