public function getPermission($group_id) { $role = UserPermission::where('group_id', $group_id)->get(); if ($role->toArray()) { } }