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:

Redirect :: Route ('admin_permit_user', $ Ultimate); It is clear that some parameters are expected and you are not giving it one, which uses stang strings.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -