Skip to content
A lightweight file browser for Laravel 5 applications.
JavaScript CSS PHP HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
composer.json

README.md

Laravel File Browser

This package provides a lightweight file explorer that can be easily customised and integrated into your laravel 5.* applications.

File Browser Screenshot

Installation

Install with Composer:

composer require crowles/laravel-filebrowser

Getting Started

First you'll need to add the Service Provider to your config/app.php:

Crowles\FileBrowser\FileBrowserServiceProvider::class,

Publishing Assets

Then publish the vendor assets:

Views:

php artisan vendor:publish --provider="Crowles\FileBrowser\FileBrowserServiceProvider" --tag views

Assets:

php artisan vendor:publish --provider="Crowles\FileBrowser\FileBrowserServiceProvider" --tag assets

Config:

php artisan vendor:publish --provider="Crowles\FileBrowser\FileBrowserServiceProvider" --tag config

Configuration

You'll now need to add the path to the root directory you want the file browser to access, do this by changing the following values in config/filebrowser.php:

    /*
    |--------------------------------------------------------------------------
    | Path
    |--------------------------------------------------------------------------
    |
    | The path to scan for files and folders.
    |
    | You must use an absolute path.
    |
    */
    'path' => env('FILEBROWSER_PATH', ''),

    /*
    |--------------------------------------------------------------------------
    | Root
    |--------------------------------------------------------------------------
    |
    | The root diectory where you want to initialise the file browser
    |
    */
    'root' => env('FILEBROWSER_ROOT', ''),

Default Routes

The following routes are configured by default with prefix filebrowser/:

$router->get('/', '\Crowles\FileBrowser\FileBrowserController@index');
$router->get('/scan', '\Crowles\FileBrowser\FileBrowserController@scan');

To access the file browser, you can navigate to http://yoursite.local/filebrowser.

Advanced

Documentation on how to override default views coming soon.

License

Laravel File Browser is open-sourced software licensed under the MIT license.

You can’t perform that action at this time.