/** * Gets all existing database records for permissions and add them * in array, according to the routes array from the getRouteData method * * @return array */ protected function getAllActions() { $array = []; $permissions = Action::all(); foreach ($permissions as $permission) { $array[$permission->action] = $permission->uri; } return $array; }