参数1必须为字符串类型或null,给定对象

时间:2020-06-14 11:54:44

标签: laravel arguments typeerror

我收到此错误。 https://imgur.com/a/ciqruHB 自从它起作用以来,我并没有做太多改变,主要是html,很奇怪。 https://github.com/cubesacube/project

1 个答案:

答案 0 :(得分:0)

问题出在您的CustomerController20行:

public function store() {
    Customer::create($this -> validatedData());
    return redirect(); //this is the problem
}

redirect()需要路由名称或网址路径,例如redirect('/home')redirect('login')

参考 HTTP Redirect