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

UniSharp/laravel-filemanager error (Trying to get property of non-object) #299

Closed bantawa04 closed 7 years ago

bantawa04 commented 7 years ago

I'm using UniSharp/laravel-filemanager with tinyMCE 4. When I click file explorer button. I gives out error in a bootstrap model. And the error is

Trying to get property of non-object (View: F:\moonlight\resources\views\public\tour\single.blade.php)

It is requesting for route`(single.tour) which looks like:

Route::group(['middleware' => ['web']], function () { Route::get('{category}/{slug}','GetPublicController@singleTour') ->where('category', '[A-Za-z\d\-\_]+') ->where('slug', '[A-Za-z\d\-\_]+') ->name('single.tour'); }); when I comment out or remove the above route file explorer works perfectly. I have used this package in my previous projects but never had this problem and I am not using Sentinal ACL package like previous issue.

streamtw commented 7 years ago

@bantawa04 You might need to add auth middleware into your routing.

bantawa04 commented 7 years ago

Gave shot to your suggestion still same error. Route::group(['middleware' => ['auth']], function () { Route::get('{category}/{slug}','GetPublicController@singleTour') ->where('category', '[A-Za-z\d\-\_]+') ->where('slug', '[A-Za-z\d\-\_]+') ->name('single.tour'); });

streamtw commented 7 years ago

This might not be a routing issue. Please paste the line which throws the exception from your view.