I have a user table, a role table and a role_user table.
A user has many roles.
A role belongs to many users.
Relationships have been defined on each model.
I need to find out if a specific user has a role(s). Role(s) could be a string or an array of roles.
For starters I've tried just looking for one role title.
I've tried:
Role::with(array('users' => function($query){
$query->where('title', '=', 'Admin');
}))->get();
But no luck. How can I search for one specific user id?