laravel - Entrust not finding user's roles -
I have the following in my controlling method that gives JSON on my view: Public Function RolesForUser () {$ userid = input :: get ('userid'); $ Assigned = DB :: table ('assigned_roles') - & gt; Select (Arrays ('role_id')) - & gt; Where ('user_id', '=', $ userid) - & gt; get (); $ User = user :: find ($ userid); $ Roles = $ user- & gt; Roles (); $ Data = array ('assigned' = & gt; $ assigned, 'roles' = & gt; $ roles); Return Feedback: Jason ($ data); } The following (inspected using Fiddler): {"Assigned": [{"role_id": "2" }, "Role_id" "3"}, {"role_id": "4"}], "roles": {}} SQL statements using query builder correct results , But the method that uses anestust (copying since making a change to my user model) does not return any role. I also tried to solve, but it only returns a SQL error. My User Model: Exten...