【发布时间】:2018-10-31 20:38:07
【问题描述】:
请谁能告诉我如何解决这个错误。我是 laravel 的新手,所以我无法理解这些方法。请帮我解决这个错误。
未定义的方法 Illuminate\Database\Query\Builder::edit()
请帮助我或告诉我为什么会出现此错误。
【问题讨论】:
-
请在这里写一些代码。
-
请发布您的代码
-
公共函数 viewCv($id) {$user=Applicants::where('id',$id)->first();if($user->cvUrl != ""){ return response()->file(storage_path('app/'.$user->cvUrl));}else{return redirect('home')->with('status','Resume not Found.');} }public function edit($id){$applicant = 申请人::find($id);$applicant->edit();return redirect('home')->with('status','Employee Edited'); }public function delete($id){$applicant = 申请人::find($id);$applicant->delete();return redirect('home')->with('status','Employee Deleted.') ;}}
-
请将代码添加到您的问题中,而不是评论区
标签: php html css mysql laravel