Laravel -Beziehung ruft Daten ab
$roles = User::find(1)->roles;
#this works perfectly fine
#But if you retrieve data with 'where()' and 'get()'..
#then the result is a collection rather than a single item
$users = User::where('Last_name', 'specter')->get();
$roles = $users[0]->roles;
Doubtful Dotterel