PHP code example of crowles / laravel-filebrowser

1. Go to this page and download the library: Download crowles/laravel-filebrowser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crowles / laravel-filebrowser example snippets


Crowles\FileBrowser\FileBrowserServiceProvider::class,

    /*
    |--------------------------------------------------------------------------
    | 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', ''),

$router->get('/', '\Crowles\FileBrowser\FileBrowserController@index');
$router->get('/scan', '\Crowles\FileBrowser\FileBrowserController@scan');
config/app.php
sh
php artisan vendor:publish --provider="Crowles\FileBrowser\FileBrowserServiceProvider" --tag views
sh
php artisan vendor:publish --provider="Crowles\FileBrowser\FileBrowserServiceProvider" --tag assets
sh
php artisan vendor:publish --provider="Crowles\FileBrowser\FileBrowserServiceProvider" --tag config
config/filebrowser.php