0
I’m using Laravel 5.6 along with the Adminlte. When I log in it is returning me the error
Errorexception (E_ERROR) Trying to get Property of non-object
Indicating the view page.blade.php, in the stretch
<div class="pull-left info text-center">
<p>{{ Auth::user()->name}}</p>
<p>Crc {{ Auth::user()->crc}}</p>
</div>
I tried using the auth()->user()->name class, but the same problem occurs.
Model Users
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email','cpf', 'crc', 'password', 'cep', 'endereco', 'numero',
'bairro', 'cidade',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token', 'cpf', 'crc',
];
}
I’ll test it here, vlw!
– Rafael Lemes
After a long time thinking and reviewing the code I found that it was problems in the routes.
– Rafael Lemes