Laravel redirect::route is showing a message between page loads

后端 未结 4 1590
天命终不由人
天命终不由人 2021-01-06 04:57

I\'m currently developing a web app using Laravel, and the app was working perfectly fine until recently. I had no idea what triggered it but here\'s a summary of the issue

4条回答
  •  轮回少年
    2021-01-06 05:34

    Although Without seeing more of your setup, it will be tricky to debug, you do have an error within your route....

    Route::get('/', array('as'=>'home', 'use'=>'HomeController@show'));
    

    Should be:

    Route::get('/', array('as'=>'home', 'uses'=>'HomeController@show'));
    

    Note the 'uses' as opposed to 'use'.

    Also, theres nothing wrong with Using View::make, however its possibly not the best logic to use, as the user will have content displayed that doesn't fit with the url. Best practice would be to redirect them as you currently are..... Just make sure the route is there for them to hit once redirected.

提交回复
热议问题