2015-12-22 66 views
0
<form id="login-form" action="brand-dashboard" method="post"> 
     <span class"email">email</span> 
     <input type="email" name="email"> 
     <span class"email">password</span> 
     <input type="password" name="password"><br><br> 
     <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"> 
     <input type="submit" value="login"> 
</form> 

這在我看來是page..then在我的路線..laravel POST請求導致的錯誤方法不被允許

Route::get('/brand-dashboard','[email protected]_brand_admin'); 
在我的品牌

controller..i使用像

方法
public function auth_brand_admin() 
    {    
     return ('sample text'); 
    } 

但submiting形式..the錯誤是,當我遇到錯誤..

MethodNotAllowedHttpException in RouteCollection.php 

回答

3

將代碼改爲

Route::post('/brand-dashboard','[email protected]_brand_admin');

這是因爲您註冊路線與GET方法,但發送POST請求。

+0

代碼複製粘貼問題.. :) anywayz謝謝.. –

+0

@JasmelPc歡迎:) – xAoc

相關問題