我正在尝试使用Laravel控制器提交表单数据。但是我在提交时遇到了这个错误
local.ERROR:BadMethodCallException:方法[validateTextRequired]不存在。
controller.php
$this->validate($request, [
'photo' => 'required|mimes:jpg,gif,png,jpe,jpeg',
'title' => 'required|min:3|max:45',
'name' => 'required',
'address' => 'required',
'city' => 'required',
'tribe' => 'required',
'language' => 'required',
'country' => 'required',
'student_id' => 'required',
'tribe_university_name' => 'required',
'student_program_of_study' => 'required',
'faculty' => 'required',
'bank_name' => 'required',
'account_number' => 'required',
'address' => 'required',
'swift_code' => 'required',
'routing_number' => 'required',
// 'categories_id' => 'required',
'goal' => 'required|integer|max:' . $this->settings->max_campaign_amount . '|min:' . $this->settings->min_campaign_amount,
'description' => 'text_required|required|min:20',
]);
if ($this->request->hasFile('photo')) {
$image = $request->photo->store('public/images');
}
$user = User::find(Auth::user()->id);
$user->address = trim($this->request->address);
$user->city = trim($this->request->city);
$user->tribe = trim($this->request->tribe);
$user->tribe_university_name = trim($this->request->tribe_university_name);
$user->student_program_of_study = trim($this->request->student_program_of_study);
$user->faculty = trim($this->request->faculty);
$user->level = trim($this->request->level);
$user->save();
return $id_campaign;
无法解决问题。有人帮忙吗?