Jaskaran Singh Puri Jaskaran Singh Puri - 3 years ago 331
PHP Question

Laravel HTTP status code "1" is not valid error

I'm trying to access my url at:


My Routes


My controller

public function show($question_id) {

return redirect('questions',compact('showQuestion'));

For some reason I'm getting this error

InvalidArgumentException in Response.php line 458:
The HTTP status code "1" is not valid.

What could be the problem?

Answer Source

I guess you are trying to return a view

public function show($question_id) {

    return view('questions')->with('question', $showQuestion);

source: https://laravel.com/docs/5.2/views#passing-data-to-views

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download