php - converting json to associative array in laravel? -
I want to send user permission (sentry) on a blade page. User permission is a Jason object (as I know). This is the control code:
$ user = Sentry :: findUserByID ($ id); $ Gr = Sentry :: findGroupByName ('Administrators'); $ Permissions = $ gr- & gt; Permissions; $ Per = json_decode ($ permissions); Return Redirect :: Way ('admin_permit_user') - & gt; ('Per', $ per);
But he gave me this error:
json_decode () parameter 1 expects string to be done, array
OK and when I send json_decode $ permissions before changing it I get an error:
Symphony \ Component \ HTTKarnel \ exception \ NotFoundHttpException
and in the URL I am looking for something like this:
/ admin / user / permission /% 7bid% 7d
Is there even json file to convert to array? Or what's wrong with me? Thanks for the time.
Depending on how the route is defined, but the first thing to do the repair:
Comments
Post a Comment