UniSharp / laravel-filemanager

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
https://unisharp.github.io/laravel-filemanager/
MIT License
2.08k stars 721 forks source link

Not found / Target class does not exist [Laravel 6] #870

Open janooosh opened 4 years ago

janooosh commented 4 years ago

After following the installation procedures, i receive a 404 when opening the filemanager. Interestingly, it works fine with 1.8 (on laravel 6; with composer require laravel/helpers which i actually don't want to do for future compability issues and because i would love to use the newest features of this great package).

Bildschirmfoto 2020-01-16 um 15 32 44

After adding the following snippet to web.php, the error changed to "Target class [Unisharp\Laravelfilemanager\controllers\LfmController] does not exist."

Route::group(array('before' => 'auth'), function ()
{
    Route::get('/laravel-filemanager', '\Unisharp\Laravelfilemanager\controllers\LfmController@show');
    Route::post('/laravel-filemanager/upload', '\Unisharp\Laravelfilemanager\controllers\LfmController@upload');

});
Bildschirmfoto 2020-01-16 um 15 33 27

How can i get 2.0 to work with laravel 6.0? Thanks, great package!

NetRally commented 4 years ago

From the documentation, change your route! Edit routes/web.php :

Create route group to wrap package routes.

Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () {
     \UniSharp\LaravelFilemanager\Lfm::routes();
 });

Make sure auth middleware is present to :

prevent unauthorized uploads work properly with multi-user mode

maungyehtunzaw commented 4 years ago

package 2.0 version support laravel 6.10 ? I have trouble in 1.8 version with lavael 6