Route [login] not defined

前端 未结 14 1886
無奈伤痛
無奈伤痛 2020-12-02 15:15

Trying to play with Laravel today for the first time. I am getting the following error when I attempt to visit localhost/project/public:

InvalidArgume

14条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 15:57

    You're trying to redirect to a named route whose name is login, but you have no routes with that name:

    Route::post('login', [ 'as' => 'login', 'uses' => 'LoginController@do']);
    

    The 'as' portion of the second parameter defines the name of the route. The first string parameter defines its route.

提交回复
热议问题