Redirect::back() is not working in laravel 5.2

前端 未结 1 850
花落未央
花落未央 2021-01-27 11:52
if(count($data) == 1){
            return view(\'welcome\');
        }
        else {
            // echo \"dslkfjads\";
            Redirect::back()->with(\'message\         


        
1条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-27 12:04

    You have to return a response object, so your code should looks like this:

    if (count($data) == 1) {
        return view('welcome');
    } else {
        return Redirect::back()->with('message', 'Username or password not Match!');
    }
    

    0 讨论(0)
提交回复
热议问题