簡體   English   中英

參數 1 必須是字符串類型或 null, object 給定

[英]Argument 1 must be of the type string or null, object given

我得到這個錯誤。 https://imgur.com/a/ciqruHB自從它工作以來我也沒有太大變化,主要是 html,很奇怪。 https://github.com/cubesacube/project

問題出在第20行的CustomerController中:

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

redirect()需要路由名稱或 url 路徑,例如redirect('/home')redirect('login')

參考HTTP 重定向

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM