小编you*_*ury的帖子

方法 Illuminate\Http\Request::validated 不存在

我尝试使用验证系统但给我错误Method Illuminate\Http\Request::validated does not exist

文件控制器.php

 public function store(Request $request)
        {
            $this->validate($request, [
                'titre' => ['bail','required_without:titre', 'string','min:3', 'max:255'],
                'name' => ['bail','required_without:name', 'string','min:3', 'max:255'],
                 ]);
          $file= new File($request->validated());
          $file->save();
            return Redirect::to("/")
            ->withSuccess('Great! file has been successfully uploaded.');
        }
Run Code Online (Sandbox Code Playgroud)

php validation laravel

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

laravel ×1

php ×1

validation ×1