Property [type] does not exist on this collection instance.
I am doing a project in Laravel (5.4) where it is practically ready, but this error is occurring, because I want the user to click to login, the \home
view does not appear and enter this if / else:
public function index()
{
$user = Auth::user();
if($user->tipo == 'Administrador'){
return View('/inicioadm'); //aqui já tentei com redirect e tbm n foi
}else{
return View('/iniciodes'); //aqui já tentei com redirect e tbm n foi
}
}
Routes:
Route::('home', 'Auth\HomeController@index');
Route::post('home', 'Auth\HomeController@index');