Download the PHP package moh-slimani/media without Composer
On this page you can find all versions of the php package moh-slimani/media. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download moh-slimani/media
More information about moh-slimani/media
Files in moh-slimani/media
Package media
Short Description A Media Model for laravel medialibrary
License MIT
Homepage https://github.com/moh-slimani/media
Informations about the package media
A Media Model for laravel medialibrary
This package simplifies the integration of Spatie MediaLibrary by offering a streamlined approach to registering and managing media assets within Laravel applications, effortlessly cast media to a simple format, leveraging a path generator that enhances readability and organization. Seamlessly handle media registration while maintaining all functionalities of The MediaLibrary package.
Installation
You can install the package via composer:
You must publish and run the migrations,this will add soft delete to the media model
change the media_model in the media library config file
config/media-library.php
Optional : you can change the path generator in the media library config file
Usage
After that you can add files it like you used to using the medialibrary
package
the function addMediaFiles to simplify the process of adding media files to collections. This function allows you to add a single file to a specified collection and provides an option to keep or delete existing files in the collection. it will also generate a unique code based on current time to prepend to the file name You can find more information about this and other changes in the CHANGELOG.
you can get the files like this
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Mohamed slimani
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of media with dependencies
laravel/framework Version ^10.44
spatie/laravel-medialibrary Version ^11.4.1
spatie/laravel-package-tools Version ^1.14.0