overtrue / laravel-uploader by overtrue

An upload component for Laravel.
59,141
137
8
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

Laravel Uploader

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

Installing

  1. 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
    
  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')
    

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT