I have an app made in Laravel 5 using the entrust package:
https://github.com/Zizaco/entrust/tree/laravel-5
I have a query that already runs fine that gets paginated users that match a search string like so:
User::like($search)->skip($offset)->take($limit)->get()
With entrust I have a role called admin so how would I adapt this query so it only returns users that have the role admin. This didnt work:
User::like($search)->hasRole('admin)->skip($offset)->take($limit)->get()