PHP Package: spatie/laravel-medialibrary

Laravel Media Library is a powerful media management package for Laravel applications, enabling easy integration and handling of media files.

Current Version: 11.15.0
Last Updated: 2025-09-19
PHP Requirement: ^8.2
Dependencies:
illuminate/support
league/flysystem
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Laravel Media Library simplifies media management tasks by providing a structured way to handle file uploads, organizing resources, and associating media with models. This package streamlines the process of attaching images, PDFs, videos, and other files to Eloquent models.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 11.15.0

Download Download v11.15.0

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/laravel-medialibrary/11.15.0/loader.php';
require_once 'libs/illuminate/support/12.33.0/loader.php';
require_once 'libs/league/flysystem/{lib_version}/loader.php';

use Spatie\MediaLibrary\MediaCollections\MediaCollection;
use Illuminate\Support\Str;

$obj = new MediaCollection();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.