fails()) { // if it fails... -6ren">
gpt4 book ai didi

php - Laravel 给出错误 : The Response content must be a string or object implementing __toString(), "boolean"

转载 作者:行者123 更新时间:2023-12-02 07:31:09 24 4
gpt4 key购买 nike

我在以下代码中收到上述错误,完全无法找出真正的原因。

        if ($validation->fails()) {
// if it fails...
return Redirect::to("login")->withErrors($validation)->withInput();
} else {
// storing user session... if it passes...
$username = Input::get("username");
Session::put("username", $username);
return Redirect::to("/");
}

最佳答案

检查filters.php,确保Closure在通过验证时返回null或不返回。

关于php - Laravel 给出错误 : The Response content must be a string or object implementing __toString(), "boolean",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17786791/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com