Laravel5 Response "The HTTP status code "1" is not valid."

I guess you try to show the search results after searching. The problem is this line.

return Redirect::to('property/search', compact('properties'));

After you get the search result you should call a view, not redirect.

return view('property.search', compact('properties'));

But make sure you have the view file.

Source


Also, in Laravel 5 it happens to me when I forget and try using named route on redirect:

return redirect('users.overview', ['id' => $id]); // Error

instead of:

return redirect()->route('users.overview', ['id' => $id]);

I had the same issue.

Try using with() as in your else block :

return Redirect::to('property/search')->with(compact('properties'))

Moreover as of Laravel 5, you can simply use the redirect() helper like this:

return redirect('property/search')->with(compact('properties'))