I want to send user permissions (sentry) to a blade page.user permission is a json object(as I know). it's controller code:
$user = Sentry::findUserByID($id);
$gr = Sentry::findGroupByName('admin');
$permissions = $gr->permissions;
$per = json_decode($permissions);
return Redirect::route('admin_permit_user')->with('per', $per);
but it gave me this error:
json_decode() expects parameter 1 to be string, array give
ok and when I send $permissions before convert it by json_decode .I get the error:
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
and in the url I see something like this:
/admin/user/permission/%7Bid%7D
is there anyway to convert json file to array? or what is my wrong? thanks for time.