PHP code example of barryvdh / laravel-elfinder

1. Go to this page and download the library: Download barryvdh/laravel-elfinder 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/ */

    

barryvdh / laravel-elfinder example snippets


'disks' => [
    'local',
    'my-disk' => [
        'URL' => url('to/disk'),
        'alias' => 'Local storage',
    ]
],

   'public' => [
       'driver' => 'local',
       'root'   => base_path().'/public',
   ],
   

   Route::get('glide/{path}', function($path){
       $server = \League\Glide\ServerFactory::create([
           'source' => app('filesystem')->disk('public')->getDriver(),
	   'cache' => storage_path('glide'),
       ]);
       return $server->getImageResponse($path, Input::query());
   })->where('path', '.+');
   

   'disks' => [
       'public' => [
           'glideURL' => '/glide',
       ],
   ],
   

route('elfinder.tinymce5');

route('elfinder.tinymce4');
javascript
file_picker_callback : elFinderBrowser
javascript
file_browser_callback : elFinderBrowser
javascript
function elFinderBrowser (field_name, url, type, win) {
  tinymce.activeEditor.windowManager.open({
    file: '<?= route('elfinder.tinymce4') 
javascript
file_browser_callback : 'elFinderBrowser'