4

I am using https://github.com/barryvdh/laravel-elfinder and whenever i set middleware to auth in config/elfinder.php file , I am redirected to home page, but whene i use middleware to NULL , elfinder opens perfectly fine.

How can i secure the route of elfinder in laravel , so that only accessed user are allowed to open the file manager ?

Thanks

John Cargo
  • 1,839
  • 2
  • 29
  • 59

1 Answers1

6

The Solution is to use web as another middleware in config\elfinder.php file.

So, the solution becomes

'middleware' => "['auth', 'web']",

From laravel 5.2 , "web" middleware has been introduced.

John Cargo
  • 1,839
  • 2
  • 29
  • 59
  • 2
    A little remark : It only works for me when i remove the double quotes. Like so: `'middleware' => ['auth', 'web'],` – Christophvh Mar 23 '16 at 13:03