Download the PHP package jasekz/laradrop without Composer
On this page you can find all versions of the php package jasekz/laradrop. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jasekz/laradrop
More information about jasekz/laradrop
Files in jasekz/laradrop
Package laradrop
Short Description File manager using Dropzone.js for Laravel 5 | 6 | 7 | 8
License MIT
Informations about the package laradrop
This uses SoftDelete
Laradrop
This is a file manager using Dropzone.js for Laravel 5, 6, 7, 8. It provides basic functionality for managing, uploading, and deleting files.
Quick Start
1) Follow the Installation instructions below.
Getting errors? Make sure you have a database set up (https://laravel.com/docs/database).
2) In a view (welcome.blade.php, for example), add:
3) In your .env file, add:
4) In your config/filesystems.php, add to your disks
array:
That's it. If you have any issues or question, please feel free to open an issue.
Installation
NOTE: If you haven't set up a database yet for your app, please do that first as per Laravel docs - http://laravel.com/docs/database.
Via composer
Then in your config/app.php
add
to the providers
array.
Then run
php artisan vendor:publish
followed by
php artisan migrate
Configuration (.env)
Laradrop uses Laravel's Filesystem mechanism (https://laravel.com/docs/filesystem) and by default will store your
files in the storage/app
directory. If you would like to modify this behavior, along with other default settings, you can set your .env
file variables:
Usage
This package requires Dropzone.js, jQuery, and jQuery UI. Include these somewhere in your template:
By default, Laradrop is designed for Bootstrap, but it's not a requirement. Include Bootstrap and the Laradrop styles if you'd like to use it:
Add the html code where you'd like to implement the file manager. Note, that by default, there is no middleware assigned to the Laradrop controller, however, it you assign middleware which contains csrf protection, you must include the laradrop-csrf-token="{{ csrf_token() }}"
attribute.
Finally, bind it using jQuery:
Events
Laradrop currently fires two events:
- Jasekz\Laradrop\Events\FileWasUploaded - this is fired after a file has been uploaded and saved.
- Jasekz\Laradrop\Events\FileWasDeleted - this is fired after a file is deleted.
Handlers (upload, delete, list, etc)
If you'd like to implement your own hanldlers (or extend the existing ones with your own controllers), you can do so. All you need to do, is to defined the routes to the appropriate handlers in the button attributes. This also allows you to easily have multiple handlers for different use cases, if so desired.
File type validations
The default implementation of accept checks the file's mime type or extension against this list. This is a comma separated list of mime types or file extensions.
Eg.: image/*,application/pdf,.psd
If the Dropzone is clickable this option will also be used as accept parameter on the hidden file input as well.
License
The MIT License (MIT). Please see License File for more information.
All versions of laradrop with dependencies
illuminate/support Version ~5.0|^6.0|^7.0|^8.0
ext-fileinfo Version *
intervention/image Version 2.*
illuminate/database Version ~5.0|^6.0|^7.0|^8.0
ext-json Version *
illuminate/routing Version ~5.0|^6.0|^7.0|^8.0
illuminate/queue Version ~5.0|^6.0|^7.0|^8.0