1👍
Check the following things
1) User.php
your model file and make sure it has the roles
relation loaded.
protected $with = ['roles']
Print in console user
data and see that roles
have been loaded.
2) You have a typo on isAdmin()
code
isAdmin() {
//return this.user.slug === 'admin';
return this.user.roles.slug === 'admin';
}
This should work fine.
Source:stackexchange.com