Package Data | |
---|---|
Maintainer Username: | overtrue |
Maintainer Contact: | i@overtrue.me (overtrue) |
Package Create Date: | 2016-11-11 |
Package Last Update: | 2024-10-08 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-14 15:11:52 |
Package Statistics | |
---|---|
Total Downloads: | 59,141 |
Monthly Downloads: | 2,830 |
Daily Downloads: | 91 |
Total Stars: | 137 |
Total Watchers: | 8 |
Total Forks: | 20 |
Total Open Issues: | 1 |
:palm_tree: An upload component that allows you to save more time playing LOL.
register provider and configuration.
$ composer require overtrue/laravel-uploader -vvv
then register the package service provider, add the following line to providers
section of config/app.php
:
Overtrue\LaravelUploader\UploadServiceProvider::class,
and publish the assets using command:
$ php artisan vendor:publish --provider=Overtrue\\LaravelUploader\\UploadServiceProvider
Routing
You can register routes in routes/web.php
or other routes file:
\LaravelUploader::routes();
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')
想知道如何从零开始构建 PHP 扩展包?
请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》
MIT