public function post_delete_role(Request $request, User $user, Role $role, Role_user $role_user, Admin $admin) { $validation_rules = $admin->getValidationRulesAddRole(); $validation_messages = $admin->getValidationMessagesEditUser(); $this->validate($request, $validation_rules, $validation_messages); $arr_request = $admin->getRequestArrayAddRole($request); $role_user->delete_role($arr_request['user_id'], $arr_request['role_id']); //prepare text for output $user = $user->find($arr_request['user_id']); $arr_request['first_name'] = $user->first_name; $arr_request['last_name'] = $user->last_name; $role = $role->find($arr_request['role_id']); $arr_request['role'] = $role->name; $data = $admin->getDataArray($arr_request, 0, $this->arr_logged_in_user); return view('admin/delete_role_results_admin')->with('data', $data); }