Dropzone Last updated: 2022-10-04

This function built based on Dropzone JS

You can use the drop zone with all the resources quite easily, you will not need a lot of settings, all you have to do is

dropzone()->make('Upload Files', 'dropzone') 
// (dropzone) this for id not using a columns in current model
	          ->maxFiles(30)// files
	          ->acceptedMimeTypes('video/*', 'image/*'),
	          ->acceptedMimeTypes(['video/*', 'image/*']),


How are files stored in the DropZone?

you have a migration file 


and Model from dash project Dash\Models\FileManagerModel 

The reference to the resource is stored by morphTo

With the same resource model

example with column 

file_type & file_id 

If you can create a method to fetch files

example with Article Model

class Article extends Model {
	use HasFactory;
 public function files() {
	return $this->morphMany(\Dash\Models\FileManagerModel::class , 'file');


This can be applied to any model in the future

Do not forget that the drop zone is supported in both Arabic and English by default, but the main use is the English language according to the basic settings of the configuration file