https://github.com/hellopeterlee/laravel-uploader
https://github.com/hellopeterlee/laravel-uploader
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hellopeterlee/laravel-uploader
- Owner: hellopeterlee
- Created: 2018-10-30T07:52:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-21T07:15:59.000Z (about 5 years ago)
- Last Synced: 2025-01-13T18:34:39.464Z (11 months ago)
- Language: PHP
- Size: 363 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel Uploader
:palm_tree: An upload component that allows you to save more time playing LOL.
## Installing
1. register provider and configuration.
```sh
$ composer require hellopeterlee/laravel-uploader -vvv
```
then register the package service provider, add the following line to `providers` section of `config/app.php`:
```php
PeterLee\Scaffold\UploadServiceProvider::class,
```
and publish the assets using command:
```sh
$ php artisan vendor:publish --provider=HelloPeterlee\\LaravelUploader\\UploadServiceProvider
```
2. Routing
You can register routes in `routes/web.php` or other routes file:
```php
\LaravelUploader::routes();
```
## Usage
1. Add the uploader component to right position of your form:
```php
@uploader('images')
```
or assign form name:
```php
@uploader('images', ['name' => 'images'])
```
or set max files:
```php
@uploader('images', ['max' => 10])
```
and strategy (default: 'default'):
```php
@uploader('images', ['strategy' => 'avatar'])
```
2. Don't forget import uploader assets at the end of your template:
```php
@uploader('assets')
```
## License
MIT