Answer the question
In order to leave comments, you need to log in
Larave 4.2 doesn't see Auth::user() on the front end?
You need to get the current user for operations with him, what content to display, however:
{{ dd(Auth::user()) }}
// NULL
if(Auth::guest()){
$user_id = 0;
} else {
$user_id = Auth::User()->id;
}
Route::group(array('before' => 'web'), function() {
.....
Route::post('comments/store','[email protected]');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question