Download the PHP package waad/media without Composer
On this page you can find all versions of the php package waad/media. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package media
Short Description Add media to your Laravel application in one place
License MIT
Homepage https://github.com/waadmawlood/media
Informations about the package media
🔥 Media Files Package
A Package to save your files Many Disks, Many Directories By Same Model
❤️ Authors
⚠️ Mini Requirement
* version >= 2.0.0
- PHP >= 8.0.0
- Laravel 8 , 9 , 10
* version < 2.0.0
- PHP 7.4
- Laravel 7 , 8
💯 Installation
To install
first :
publish the config
with the command:
configuration from config/media.php
sure from uuid
, shortcut
in config media
⚠️ clear cache is important, before publishing migrations
Second :
publish the migrations
with the command:
You can migration
You can make a link shortcut by disk from config.media.shortcut
array of disks
🧰 Usage / Example
In Model
You Can get media
Upload Files
eg. Use in controllerstore
method to add One or Many Files
-
Sync Files
eg. Use in controllerupdate
method to add One or Many Files Delete Files
eg. Use in controllerdestroy
method to delete all or specific ids
- Other Helper
Only version >= 2
- You can update
approved
all media of the object
- You can get the
user
to upload that media
🎀 Scope
You can get only approved equal true
🍔 Permanently delete files
Determine delete_file_after_day
from config/media.php
must be integer
⭕️ Add Command to the crontab of the project to implement automatically
in app/Console/Kernel.php
add this:
⭕️ implemented manually