PHPackages                             sentix/laravel-mediamanager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. sentix/laravel-mediamanager

ActiveLaravel-package[File &amp; Storage](/categories/file-storage)

sentix/laravel-mediamanager
===========================

A comprehensive media manager package for Laravel

1.0.0(today)00MITJavaScriptPHP ^8.0|^8.1|^8.2|^8.3|^8.4|^8.5

Since Jun 26Pushed todayCompare

[ Source](https://github.com/sentixtech/laravel-mediamanager)[ Packagist](https://packagist.org/packages/sentix/laravel-mediamanager)[ RSS](/packages/sentix-laravel-mediamanager/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (2)Used By (0)

📁 Sentix Media Manager
======================

[](#-sentix-media-manager)

> A comprehensive media management package for Laravel with beautiful UI, built with Tailwind CSS.

[![Version](https://camo.githubusercontent.com/34e695c6016bc2a934a96bed696e29b2f2ab562a7134d65a55d00653cd506bea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c75652e737667)](https://camo.githubusercontent.com/34e695c6016bc2a934a96bed696e29b2f2ab562a7134d65a55d00653cd506bea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c75652e737667)[![Laravel](https://camo.githubusercontent.com/2e790d49290689f4c126824430cc56b19d9ffcd20e30734d9b11af32d0b0b617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392e7825323025374325323031302e7825323025374325323031312e7825323025374325323031322e7825323025374325323031332e782d7265642e737667)](https://camo.githubusercontent.com/2e790d49290689f4c126824430cc56b19d9ffcd20e30734d9b11af32d0b0b617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392e7825323025374325323031302e7825323025374325323031312e7825323025374325323031322e7825323025374325323031332e782d7265642e737667)[![PHP](https://camo.githubusercontent.com/8907b5369864b083a0524d4e56fa5937b11668f254cf37f14109db24e4c7cd5a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e30253230253743253230382e31253230253743253230382e32253230253743253230382e33253230253743253230382e34253230253743253230382e352d707572706c652e737667)](https://camo.githubusercontent.com/8907b5369864b083a0524d4e56fa5937b11668f254cf37f14109db24e4c7cd5a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e30253230253743253230382e31253230253743253230382e32253230253743253230382e33253230253743253230382e34253230253743253230382e352d707572706c652e737667)[![Tailwind CSS](https://camo.githubusercontent.com/356f80f76150435c9f1c3055e717eb7d2128813bcc8a3ce20666db54dd85a704/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e645f4353532d253545342e312e31332d3338423241432e737667)](https://camo.githubusercontent.com/356f80f76150435c9f1c3055e717eb7d2128813bcc8a3ce20666db54dd85a704/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e645f4353532d253545342e312e31332d3338423241432e737667)

📋 Table of Contents
-------------------

[](#-table-of-contents)

- [✨ Features](#-features)
- [🚀 Installation](#-installation)
- [⚙️ Configuration](#%EF%B8%8F-configuration)
- [🎨 Usage](#-usage)
    - [Blade Directives](#blade-directives)
    - [Blade Components](#blade-components)
    - [Facade Methods](#facade-methods)
- [📁 File Management](#-file-management)
- [🎯 Features Details](#-features-details)
- [🎨 Customization](#-customization)
- [🔒 Security](#-security)
- [📚 API Reference](#-api-reference)
- [🐛 Troubleshooting](#-troubleshooting)
- [🤝 Contributing](#-contributing)
- [📄 License](#-license)

---

✨ Features
----------

[](#-features)

- 📤 **Drag &amp; Drop Upload** - Intuitive file upload with progress
- 🖼️ **Multiple File Types** - Images, Videos, Documents, Spreadsheets
- 🎨 **Tailwind CSS UI** - Modern, responsive, and customizable
- 🏷️ **Smart Filters** - Filter files by type, date, and size
- 🔍 **Search &amp; Sort** - Quick file search with multiple sort options
- 📋 **Grid &amp; List Views** - Toggle between viewing modes
- 🗂️ **Bulk Operations** - Select and delete multiple files
- 🔒 **Permission System** - Granular access control
- 📱 **Mobile Responsive** - Works on all devices
- 🔄 **Event System** - Hooks for before/after operations

---

🚀 Installation
--------------

[](#-installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
composer require sentix/laravel-mediamanager
```

### Step 2: Publish Assets

[](#step-2-publish-assets)

```
# Publish configuration
php artisan vendor:publish --provider="Sentix\MediaManager\MediaManagerServiceProvider" --tag=media-config

# Publish views (optional - for customization)
php artisan vendor:publish --provider="Sentix\MediaManager\MediaManagerServiceProvider" --tag=media-views

# Publish assets (CSS/JS)
php artisan vendor:publish --provider="Sentix\MediaManager\MediaManagerServiceProvider" --tag=media-assets

# Run migrations
php artisan migrate
```

### Step 3: Add Alias (Optional)

[](#step-3-add-alias-optional)

Add to `config/app.php`:

```
'aliases' => [
    // ...
    'Media' => Sentix\MediaManager\Facades\Media::class,
],
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### Basic Configuration (`config/media.php`)

[](#basic-configuration-configmediaphp)

```
return [
    // Default tab when opening media manager
    'default_tab' => env('MEDIA_MANAGER_DEFAULT_TAB', 'select'),

    // Storage settings
    'storage' => [
        'disk' => env('MEDIA_MANAGER_DISK', 'public'),
        'directory' => env('MEDIA_MANAGER_DIRECTORY', 'media'),
        'thumbnails_directory' => env('MEDIA_MANAGER_THUMBNAILS_DIRECTORY', 'media/thumbnails'),
    ],

    // Allowed file types
    'allowed_types' => [
        'image' => [
            'enabled' => true,
            'extensions' => ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'ico'],
            'max_size' => 5120, // 5MB
            'thumbnail' => true,
        ],
        // ... other types
    ],

    // Pagination
    'pagination' => [
        'per_page' => 12,
        'per_page_options' => [12, 24, 48, 96],
    ],
];
```

### Environment Variables

[](#environment-variables)

```
# Storage
MEDIA_MANAGER_DISK=public
MEDIA_MANAGER_DIRECTORY=media
MEDIA_MANAGER_THUMBNAILS_DIRECTORY=media/thumbnails

# Permissions (if enabled)
MEDIA_MANAGER_PERMISSION_UPLOAD=media
MEDIA_MANAGER_PERMISSION_DELETE=media
MEDIA_MANAGER_PERMISSION_VIEW_ALL=media
MEDIA_MANAGER_PERMISSION_BULK_DELETE=media

# Default tab
MEDIA_MANAGER_DEFAULT_TAB=select
```

---

🎨 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

```
{{-- Include the media manager --}}
@mediaView()

{{-- Or use the Blade Component for Select Media --}}

{{-- Include the modal --}}
@mediaModal()

{{-- Include the scripts --}}
@mediaScript()
```

### Blade Directives

[](#blade-directives)

DirectiveDescriptionExample`@mediaView()`Renders the main media manager interface`@mediaView()``@mediaModal()`Renders the file selection modal`@mediaModal()``@mediaScript()`Includes required JavaScript`@mediaScript()``@mediaSelector()`Renders a file selector button`@mediaSelector('myFile'['multiple' => true])`### Blade Components

[](#blade-components)

#### Media Component

[](#media-component)

```

```

### PHP Usage

[](#php-usage)

```
use Sentix\MediaManager\Facades\Media;

// Upload a file
$media = Media::upload($file, [
    'directory' => 'posts',
    'resize' => ['width' => 800, 'height' => 600],
]);

// Get media URL
$url = Media::url($media->id);

// Delete media
Media::delete($media->id);

// Get media info
$info = Media::info($media->id);
```

---

📁 File Management
-----------------

[](#-file-management)

### File Types Supported

[](#file-types-supported)

CategoryExtensionsMax Size (KB)Thumbnails**Images**jpg, jpeg, png, gif, bmp, svg, webp, ico5120❌ NO**Videos**mp4, avi, mov, mkv, webm, flv, mpeg102400❌ No**Audio**mp3, wav, ogg, m4a, aac, flac20480❌ No**Documents**pdf, doc, docx, txt, rtf10240❌ No**Spreadsheets**xls, xlsx, csv10240❌ No### Upload Methods

[](#upload-methods)

#### 1. Drag and Drop

[](#1-drag-and-drop)

Simply drag files from your computer and drop them into the upload area.

#### 2. Click to Upload

[](#2-click-to-upload)

Click the upload button or drop zone to open the file picker.

#### 3. URL Upload

[](#3-url-upload)

Add files directly from a URL (configurable).

---

🎯 Features Details
------------------

[](#-features-details)

### File Filtering

[](#file-filtering)

FilterDescriptionIcon**All Files**Show all uploaded files📁**Images**Show only image files🖼️**Videos**Show only video files🎬**Documents**Show only document files📄**Spreadsheets**Show only spreadsheet files📊**PDF Files**Show only PDF files📕### Sorting Options

[](#sorting-options)

OptionSort ByDirectionNewest FirstCreated DateDescendingOldest FirstCreated DateAscendingName (A-Z)NameAscendingName (Z-A)NameDescendingLargest FirstSizeDescendingSmallest FirstSizeAscending### View Modes

[](#view-modes)

#### Grid View

[](#grid-view)

- Shows thumbnails in a responsive grid
- Great for image browsing
- Shows file name, size, and type

#### List View

[](#list-view)

- Shows files in a table format
- Shows detailed information
- Better for file management

---

🎨 Customization
---------------

[](#-customization)

### Customizing Views

[](#customizing-views)

Publish and modify views:

```
php artisan vendor:publish --provider="Sentix\MediaManager\MediaManagerServiceProvider" --tag=media-views
```

Views location: `resources/views/vendor/media/`

### Adding Custom File Types

[](#adding-custom-file-types)

```
// config/media.php
'allowed_types' => [
    'custom' => [
        'enabled' => true,
        'extensions' => ['custom'],
        'mime_types' => ['application/custom'],
        'max_size' => 10000,
        'thumbnail' => false,
    ],
],
```

### Custom Filters

[](#custom-filters)

```
// config/media.php
'filters' => [
    'custom' => [
        'label' => 'Custom Files',
        'icon' => 'fa-custom',
        'color' => 'orange',
        'enabled' => true,
        'extensions' => ['custom'],
    ],
],
```

### Custom Events

[](#custom-events)

```
// config/media.php
'events' => [
    'before_upload' => function($file) {
        // Custom upload logic
        return $file;
    },
    'after_upload' => function($media) {
        // Custom after upload logic
        Log::info('File uploaded: ' . $media->name);
    },
    'before_delete' => function($media) {
        // Custom delete logic
        if ($media->is_protected) {
            throw new Exception('Protected file cannot be deleted');
        }
    },
    'after_delete' => function($media) {
        // Custom after delete logic
    },
],
```

---

🔒 Security
----------

[](#-security)

### Permission System

[](#permission-system)

Enable permissions in config:

```
'permission' => true,
'permissions' => [
    'upload' => 'upload-media',
    'delete' => 'delete-media',
    'view_all' => 'view-all-media',
    'bulk_delete' => 'bulk-delete-media',
],
```

### File Sanitization

[](#file-sanitization)

Automatically sanitizes filenames:

```
// Before: "My File (1).jpg"
// After: "my-file-1.jpg"
```

---

📚 API Reference
---------------

[](#-api-reference)

### Facade Methods

[](#facade-methods)

MethodDescriptionParametersReturn`upload()`Upload a file`$file, $options = []``Media``delete()`Delete a file`$id``bool``url()`Get file URL`$id``string``info()`Get file info`$id``array``search()`Search files`$query, $options = []``Collection``thumb()`Get thumbnail URL`$id, $size = 'medium'``string``download()`Download file`$id``Response``bulkDelete()`Delete multiple files`$ids``bool``view()`Render view`$options = []``string``modal()`Render modal`$options = []``string``script()`Render JavaScript`$options = []``string``selector()`Render selector`$options = []``string`### Service Methods

[](#service-methods)

```
use Sentix\MediaManager\Services\MediaService;

$mediaService = app(MediaService::class);

// Get all files
$files = $mediaService->all();

// Get paginated files
$files = $mediaService->paginate(12);

// Get files by type
$images = $mediaService->getByType('image');

// Get recent files
$recent = $mediaService->getRecent(10);

// Get file by ID
$file = $mediaService->find($id);

// Generate thumbnail
$thumb = $mediaService->generateThumbnail($file, 'small');

// Update file metadata
$mediaService->update($id, ['title' => 'New Title']);
```

---

🐛 Troubleshooting
-----------------

[](#-troubleshooting)

### Common Issues

[](#common-issues)

#### 1. Files not showing up

[](#1-files-not-showing-up)

**Solution:** Check storage symlink:

```
php artisan storage:link
```

#### 2. Permission denied

[](#2-permission-denied)

**Solution:** Check folder permissions:

```
chmod -R 755 storage/app/public/media
```

#### 3. Thumbnails not generating

[](#3-thumbnails-not-generating)

**Solution:** Ensure GD library is installed:

```
php -m | grep gd
```

#### 4. Upload failing

[](#4-upload-failing)

**Solution:** Check upload limits in `php.ini`:

```
upload_max_filesize = 100M
post_max_size = 100M
memory_limit = 256M
```

#### 5. JavaScript not working

[](#5-javascript-not-working)

**Solution:** Ensure assets are published:

```
php artisan vendor:publish --provider="Sentix\MediaManager\MediaManagerServiceProvider" --tag=media-assets --force
```

### Debug Mode

[](#debug-mode)

Enable debug mode in config:

```
'debug' => env('MEDIA_MANAGER_DEBUG', false),
```

---

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please follow these steps:

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests
5. Submit a pull request

### Development Setup

[](#development-setup)

```
# Clone the repository
git clone https://github.com/sentix/laravel-mediamanager.git

# Install dependencies
composer install

# Run tests
vendor/bin/phpunit

# Run test coverage
vendor/bin/phpunit --coverage-html coverage
```

---

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

🙏 Support
---------

[](#-support)

- 📧 Email:
- 🐛 Issues: [GitHub Issues](https://github.com/sentix/laravel-mediamanager/issues)

🎯 Quick Start Example
---------------------

[](#-quick-start-example)

```
{{-- app.blade.php --}}

    Media Manager Demo
    @vite(['resources/css/app.css', 'resources/js/app.js'])

        Media Manager

        {{-- Include media manager --}}
        @mediaView()
        @mediaModal()
        @mediaScript()

```

---

📝 Changelog
-----------

[](#-changelog)

### v1.0.0 (2024-01-XX)

[](#v100-2024-01-xx)

- ✨ Initial release
- 🎨 Tailwind CSS UI
- 📤 Drag and drop upload
- 🖼️ Thumbnail generation
- 🔍 File filtering and search
- 📋 Grid and list views
- 🔒 Permission system
- 🌍 Multi-language support

---

**Made with ❤️ by Vikash Bishnoi**

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/837022?v=4)[Sentix](/maintainers/Sentix)[@sentix](https://github.com/sentix)

---

Top Contributors

[![sentixtech](https://avatars.githubusercontent.com/u/147980203?v=4)](https://github.com/sentixtech "sentixtech (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sentix-laravel-mediamanager/health.svg)

```
[![Health](https://phpackages.com/badges/sentix-laravel-mediamanager/health.svg)](https://phpackages.com/packages/sentix-laravel-mediamanager)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.1k3.4M81](/packages/unisharp-laravel-filemanager)[illuminate/filesystem

The Illuminate Filesystem package.

15263.8M3.0k](/packages/illuminate-filesystem)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5452.7k](/packages/hasinhayder-tyro-dashboard)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
