Download the PHP package innopanda/laravel-asset-manager without Composer
On this page you can find all versions of the php package innopanda/laravel-asset-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innopanda/laravel-asset-manager
More information about innopanda/laravel-asset-manager
Files in innopanda/laravel-asset-manager
Package laravel-asset-manager
Short Description Professional reusable asset manager for Laravel built on Livewire and Spatie Media Library.
License MIT
Homepage https://innopanda.com/
Informations about the package laravel-asset-manager
Laravel Asset Manager
A professional, drop-in asset management package for Laravel, built with Livewire and powered by Spatie Laravel Media Library.
Laravel Asset Manager provides a complete interface for uploading, organizing, browsing, selecting, replacing, versioning, and managing media assets. It can be used independently with Livewire or integrated directly into Filament forms.
โจ Features
-
๐ Virtual Folder Tree Organize assets into nested folders without changing their physical storage paths.
-
๐ฏ Asset Picker Browse, search, upload, preview, and select assets through a reusable modal interface.
-
๐ผ๏ธ Thumbnail Generation Generate optimized previews and thumbnails using Spatie Laravel Media Library.
-
๐ฆ Livewire Components Use the asset browser, uploader, folder tree, picker, preview, replacement drawer, and other components independently.
-
โ๏ธ Multiple Asset Selection Select one or multiple assets depending on your application requirements.
-
๐ File Replacement Replace an existing asset while preserving its previous versions and asset relationships.
-
๐ Asset Version History Previous versions of replaced files are preserved and can be reviewed or restored.
-
๐๏ธ Custom Delete Confirmation Assets and folders use styled Livewire confirmation modals instead of native browser JavaScript confirmation dialogs.
-
๐ข Tenant-Aware Architecture Supports optional tenant-based asset isolation.
-
๐งฉ Filament Integration Use
AssetPickerdirectly inside Filament forms. - ๐พ Spatie Media Library Integration Leverages Spatie Laravel Media Library for media storage, collections, conversions, and file management.
๐ Requirements
- PHP 8.3+
- Laravel 12 or 13
- Livewire 4.x
- Spatie Laravel Media Library 11.x
- Filament 4.x โ optional, only required for Filament integration
Filament is an optional dependency. The core Asset Manager and Livewire components can be used without Filament.
๐ฆ Installation
Install the package using Composer:
After installation, Laravel automatically discovers the package service provider.
Verify that the package is installed:
You should see:
Publish Configuration
Publish the Asset Manager configuration file:
This creates:
Publish Database Migrations
Publish the Asset Manager migrations to your application's database/migrations directory:
Then run the migrations:
Verify the migration status:
Publish Frontend Assets
Publish the compiled Asset Manager frontend assets:
The assets will be copied to:
โ๏ธ Configuration
Publish the configuration file:
This creates:
Example configuration:
Adjust the configuration according to your application's requirements.
๐๏ธ Database Migrations
The package includes all required database migrations for asset management.
Publish the package migrations to your application's database/migrations directory:
This publishes the Asset Manager migrations, including:
The asset_versions migration is required for File Replacement and Asset Version History functionality.
After publishing the migrations, run:
To verify the migration status:
Note: The package also loads its migrations automatically. Publishing them is recommended when you want the migration files available directly in your Laravel application's
database/migrationsdirectory and managed alongside your application's migrations.
Spatie Media Library
Laravel Asset Manager uses Spatie Laravel Media Library for media storage and management.
Make sure the required Spatie migrations are also available in your application.
If required, publish the Spatie Media Library migrations and then run:
The Asset Manager requires the media-related tables to be available before uploading and managing assets.
๐ผ๏ธ Storage
If you are using the default Laravel public disk, create the storage symlink:
Make sure your .env contains the appropriate disk configuration:
You can use another Laravel filesystem disk if required.
๐จ Publishing Frontend Assets
The package ships its compiled frontend assets.
To publish them:
The assets will be copied to:
Expected files:
If you are developing the package locally, build the package assets from the package repository:
โก Livewire Usage
Laravel Asset Manager can be used directly with Livewire without Filament.
Media Browser
Add the Media Browser component to a Blade view:
The browser provides functionality for:
- Folder navigation
- Asset browsing
- Asset searching
- Asset selection
- Asset uploading
- Asset previews
Media Picker
To display the reusable asset picker:
The picker can be used inside your own Livewire forms and components.
Listening for Asset Selection
The asset picker dispatches an asset-selected event.
In the parent Livewire component:
You can then use the selected asset in your application.
๐งฉ Filament Integration
Filament integration is available when Filament is installed in the host application.
Use the Asset Picker inside a Filament form:
Multiple Selection
To allow multiple assets:
This makes the Asset Manager suitable for:
- Profile images
- Product images
- Gallery images
- Documents
- Other application media
๐ Folder Management
Assets can be organized using virtual folders.
The folder structure does not require changing the physical storage location of the asset.
Example:
Folders can be nested and assets can be moved between folders.
๐ File Replacement
Existing files can be replaced through the asset management interface.
The replacement functionality is designed to preserve the asset's existing relationships and associations while updating the underlying media.
๐งฑ Available Livewire Components
The package provides reusable Livewire components including:
These components are registered automatically by the package service provider.
๐งช Testing
The package contains its own PHPUnit test suite.
From the package repository:
Run the complete test suite:
Example:
Run Individual Tests
Run model tests:
Run API tests:
Run Livewire tests:
Run Spatie integration tests:
๐จ Build Frontend Assets
Install Node dependencies:
Build production assets:
The compiled files are generated in:
๐ Development
Clone the repository:
Enter the package directory:
Install PHP dependencies:
Install frontend dependencies:
Build assets:
Run the test suite:
๐ Local Package Testing
To test a development version of the package in a Laravel application, you can use a Composer path repository.
In the Laravel application's composer.json:
Then require the package:
Composer will use the local package instead of downloading it from Packagist.
This is recommended when developing and testing the package before creating a release.
๐ Release Workflow
Before creating a release, run:
Then:
Verify the working tree:
Commit the changes:
Create a version tag:
Push the branch and tag:
๐ค Contributing
Contributions are welcome!
- Fork the repository.
-
Create a feature branch:
- Make your changes.
- Add or update tests.
-
Run the test suite:
-
Build frontend assets:
-
Commit your changes:
-
Push your branch:
- Open a Pull Request.
Please ensure that existing functionality continues to work and that new functionality includes appropriate tests.
๐ Architecture
The package is structured around several major areas:
The package keeps the asset-management functionality isolated from the host Laravel application.
๐ License
Laravel Asset Manager is open-sourced software licensed under the MIT License.
See the LICENSE file for more information.
๐ Repository
GitHub:
All versions of laravel-asset-manager with dependencies
illuminate/support Version ^12.0|^13.0
livewire/livewire Version ^3.8|^4.1
spatie/laravel-medialibrary Version ^11.23