Convert Figma logo to code with AI

alexusmai logolaravel-file-manager

File manager for Laravel

1,120
290
1,120
148

Top Related Projects

Associate files with Eloquent models

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.

Quick Overview

Laravel File Manager is a powerful and flexible file management system for Laravel applications. It provides a user-friendly interface for managing files and directories, supporting various file operations, and integrating seamlessly with Laravel projects.

Pros

  • Easy integration with Laravel projects
  • Supports multiple file operations (upload, download, copy, move, rename, delete)
  • Customizable interface and functionality
  • Supports both local and cloud storage systems

Cons

  • Limited documentation for advanced customization
  • May require additional setup for certain cloud storage providers
  • Performance might be affected when handling large numbers of files
  • Some users report occasional bugs with specific file operations

Code Examples

  1. Basic configuration in config/file-manager.php:
return [
    'disk' => 'public',
    'path' => '/',
    'cache' => [
        'enable' => true,
        'lifetime' => 5,
    ],
];
  1. Adding the File Manager route in routes/web.php:
Route::group(['prefix' => 'file-manager', 'middleware' => ['web', 'auth']], function () {
    \UniSharp\LaravelFilemanager\Lfm::routes();
});
  1. Using the File Manager in a Blade view:
@extends('layouts.app')

@section('content')
    <div id="fm-main-block">
        <div id="fm"></div>
    </div>

    @once
        @push('scripts')
            <script src="{{ asset('vendor/file-manager/js/file-manager.js') }}"></script>
        @endpush
    @endonce
@endsection

Getting Started

  1. Install the package via Composer:

    composer require alexusmai/laravel-file-manager
    
  2. Publish the configuration file and assets:

    php artisan vendor:publish --tag=fm-config
    php artisan vendor:publish --tag=fm-assets
    
  3. Configure the disk and path in config/file-manager.php.

  4. Add the File Manager route to your routes/web.php file.

  5. Include the File Manager in your views and start using it in your Laravel application.

Competitor Comparisons

Associate files with Eloquent models

Pros of laravel-medialibrary

  • More comprehensive media management solution with advanced features like image manipulation and conversions
  • Better integration with Laravel's Eloquent ORM for associating media with models
  • Extensive documentation and active community support

Cons of laravel-medialibrary

  • Steeper learning curve due to its more complex architecture
  • May be overkill for simple file management needs
  • Less focus on front-end file browsing and management interface

Code Comparison

laravel-medialibrary:

$model->addMedia($pathToFile)->toMediaCollection('images');
$model->getMedia('images')->first()->getUrl('thumb');

laravel-file-manager:

$fileManager = new FileManager();
$fileManager->upload($request->file('file'), 'uploads');

The laravel-medialibrary code demonstrates its tight integration with Eloquent models and built-in image conversion capabilities. In contrast, laravel-file-manager offers a simpler API for basic file operations without model associations.

laravel-medialibrary is better suited for projects requiring advanced media handling and model relationships, while laravel-file-manager is more appropriate for straightforward file management tasks with a focus on user interface.

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.

Pros of laravel-filemanager

  • More extensive documentation and examples
  • Supports image editing features (cropping, resizing)
  • Includes a built-in media selector for TinyMCE and CKEditor

Cons of laravel-filemanager

  • Less frequent updates and maintenance
  • More complex setup process
  • Limited customization options for the user interface

Code Comparison

laravel-filemanager:

$config = [
    'use_package_routes' => true,
    'allow_private_folder' => true,
    'base_directory' => 'public',
];

laravel-file-manager:

$config = [
    'leftDisk' => 'public',
    'rightDisk' => 'public',
    'leftPath' => '/',
    'rightPath' => '/',
    'separateMultipleUploads' => true,
];

Both packages offer file management capabilities for Laravel applications, but they differ in their approach and feature sets. laravel-filemanager provides more out-of-the-box features for media management and editor integration, while laravel-file-manager focuses on a simpler, more customizable approach with a modern user interface. The code comparison shows differences in configuration options, reflecting their distinct approaches to file management.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Laravel File Manager

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Laravel File Manager

Vue.js Frontend: alexusmai/vue-laravel-file-manager

Documentation

Laravel File Manager Docs

Features

  • Frontend on Vue.js - vue-laravel-file-manager
  • Work with the file system is organized by the standard means Laravel Flysystem:
    • Local, FTP, S3, Dropbox ...
    • The ability to work only with the selected disks
  • Several options for displaying the file manager:
    • One-panel view
    • One-panel + Directory tree
    • Two-panel
  • The minimum required set of operations:
    • Creating files
    • Creating folders
    • Copying / Cutting Folders and Files
    • Renaming
    • Uploading files (multi-upload)
    • Downloading files
    • Two modes of displaying elements - table and grid
    • Preview for images
    • Viewing images
    • Full screen mode
  • More operations (v.2):
    • Audio player (mp3, ogg, wav, aac), Video player (webm, mp4) - (Plyr)
    • Code editor - (Code Mirror)
    • Image cropper - (Cropper.js)
    • Zip / Unzip - only for local disks
  • Integration with WYSIWYG Editors:
    • CKEditor 4
    • TinyMCE 4
    • TinyMCE 5
    • SummerNote
    • Standalone button
  • ACL - access control list
    • delimiting access to files and folders
    • two work strategies:
      • blacklist - Allow everything that is not forbidden by the ACL rules list
      • whitelist - Deny everything, that not allowed by the ACL rules list
    • You can use different repositories for the rules - an array (configuration file), a database (there is an example implementation), or you can add your own.
    • You can hide files and folders that are not accessible.
  • Events (v2.2)
  • Thumbnails lazy load
  • Dynamic configuration (v2.4)
  • Supported locales : ru, en, ar, sr, cs, de, es, nl, zh-CN, fa, it, tr, fr, pt-BR, zh-TW, pl

In a new version 3

  • Version 3 only works with Laravel 9 and 10!
  • Vue.js 3
  • Bootstrap 5
  • Bootstrap Icons