public function post_view_log(Request $request, ThreeStepLog $three_step_log, ThreeStepAdmin $three_step_admin) { // $validation_rules = $three_step_log->getValidationRulesViewLog(); // $this->validate($request, $validation_rules); // $arr_request = $three_step_log->getRequestArrayViewLog($request); // $obj_three_step_log = $three_step_log->where(); $obj_three_step_log = $three_step_log->all(); $data = $three_step_admin->getDataArrayViewLog($obj_three_step_log, $this->arr_logged_in_user); return view('three_step_admin/view_log_results')->with('data', $data); }
/** * @param Request $request * @param ThreeStep $threeStep * @param ThreeStepLog $three_step_log * @param Role $role * @return Ambigous <\Illuminate\Http\$this, boolean, \Illuminate\Http\RedirectResponse>|Ambigous <\Illuminate\View\View, mixed, \Illuminate\Foundation\Application, \Illuminate\Container\static> */ public function getStepTwo(Request $request, ThreeStep $threeStep, ThreeStepLog $three_step_log, Role $role) { $validation_rules = $threeStep->getValidationRulesStepTwo(); $this->validate($request, $validation_rules); $arr_request = $threeStep->getRequestArrayStepTwo($request); // $role_id = Session::get('role_id'); // $obj_role = $role // ->where('id', $role_id) // ->where('cloaked_id', $arr_request['cloaked_role_id']) // ->first(); // if (!($obj_role == null)) // { $three_step_log->ip_address = $request->getClientIp(); $three_step_log->step = 'three step step two success'; $three_step_log->save(); // if ($obj_role->name == 'admin') // { // echo "obj_role name = ".$obj_role->name."<br>"; // Session::put('cloaked_role_id_from_step_two', $arr_request['cloaked_role_id']); Session::put('three_step_id_from_step_two', $arr_request['three_step_id']); return redirect('admin/home')->withInput(); // } // } // else // { // $three_step_log->ip_address = $request->getClientIp(); // $three_step_log->step = 'three step step two failure - bad input'; // $three_step_log->save(); // role not found in role table // return view('three_step/step_two_fail'); // } }