Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel错误-未定义路径[evaluation.evaluation\u goals.manager\u employee\u goal/{id?}]_Laravel - Fatal编程技术网

Laravel错误-未定义路径[evaluation.evaluation\u goals.manager\u employee\u goal/{id?}]

Laravel错误-未定义路径[evaluation.evaluation\u goals.manager\u employee\u goal/{id?}],laravel,Laravel,在Laravel-5.8项目中,该控制器: public function manager_employee_goal($id) { $userCompany = Auth::user()->company_id; $userEmployee = Auth::user()->employee_id; $identities = DB::table('appraisal_identity')->select('id')->wh

在Laravel-5.8项目中,该控制器:

public function manager_employee_goal($id)
{            
    $userCompany = Auth::user()->company_id;
    $userEmployee = Auth::user()->employee_id;
    $identities = DB::table('appraisal_identity')->select('id')->where('company_id', $userCompany)->where('is_current', 1)->first();
    $linemanager = DB::table('hr_employees')->select('line_manager_id')->where('id', $userEmployee)->first();
    $linemanageremployee = DB::table('hr_employees')->select('id')->where('line_manager_id', $linemanager->line_manager_id)->pluck('id');   
   $appraisedemployees = HrEmployee::select('id', 'employee_code', 'first_name', 'last_name')->where('id', $id)->get();   

    $goals = AppraisalGoal::where('employee_id', $id)->where('appraisal_identity_id', $identities->id)->where('is_published', 1)->where('id', '!=', $linemanager->line_manager_id)->get();
    return view('appraisal.appraisal_goals.manager_employee_goal')->with('goals', $goals)->with('appraisedemployees', $appraisedemployees);        
}
我航行到:

public function manager_employee_goal_list($id)
{
    $goal           =       AppraisalGoal::findOrFail($id);
    $goaldetails    = AppraisalGoalDetail::where('appraisal_goal_id', $id)->get();
    $goalcomments    = AppraisalGoalComment::where('appraisal_goal_id', $id)->get();
    return view('appraisal.appraisal_goals.manager_employee_goal_list')
                ->with('goal', $goal)
                ->with('goaldetails', $goaldetails)
                ->with('goalcomments', $goalcomments);       
}  
使用:


只需从目标传递员工id即可,该目标将被确定