Download the PHP package ewvlnet/dropzone without Composer
On this page you can find all versions of the php package ewvlnet/dropzone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ewvlnet/dropzone
More information about ewvlnet/dropzone
Files in ewvlnet/dropzone
Package dropzone
Short Description This package allows you to manage files in resources such as pages and posts in an laravel application.
License MIT
Informations about the package dropzone
Laravel Package Dropzone
Dropzone is a package that allows you to upload files associated with resources such as users, posts and whatever else you want.
🔧 Installing in a Laravel project
See instructions at: https://ewvl.net/posts/laravel-package-dropzone
Add the FileTrait in the Models you want to work with dropzone, for example in a Model Post.
Create the migration file below in your project 2022_01_01_000008_create_files_table
This migration file must be run after migrations it references foreign, so in the example below where we use as foreign of 'post_id' and 'user_id', we must be sure that these migrations have already been executed before, otherwise we will get an error, when you run your migrations. Set the date in the filename so it always runs last.
Run the migration
In the dropzone-uploader.blade.php and dropzone-gallery.blade.php files, push('css') and push('js') are used, remember to include this in your master layout to load the necessary scripts.
Now, you can include the blade component below in an edit.blade.php file for example.
If you haven't already done so, run the command to publish the "symbolic link", to be able to see the images of the storage folder.
To display the gallery ( usually where you retrieve the model, such as a post.show.blade.php ).
If you want to associate other models to work with dropzone-uploader, just edit the migration file of the package, adding more models in the table, as in the example below:
Publish components and assets in your application and customize as you wish.
📄 License
MIT