hellopeterlee/laravel-uploader

v0.1.2 2020-10-21 07:11 UTC

This package is auto-updated.

Last update: 2024-04-21 15:07:13 UTC


README

🌴 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