简体   繁体   中英

laravel route doesn't exist though it exits

This is my route:

Route::post('admins.login', 'AdminsController@login');

This is my form

{{ Form::open(array('route' => 'admins.login', 'class' => 'loginClass', 'method' => 'post')) }}

This is the exception:

Route [admins.login] not defined. 

The method:

public function login(){
        echo "Save Time";exit;
    }

Edit

I already tried making / instead of . in all situations

Route definition for a named route:

Route::post('admins/login', array('uses' => 'AdminsController@login', 'as' => 'admins.login'));

Form:

{{ Form::open(array('route' => 'admins.login', 'class' => 'loginClass')) }}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM