2016-04-11 18 views
0

デフォルトのAuthを/en/wholesale/loginにラップしようとしていますが、登録フォームを送信できません。私はどのファイルに触れるべきですか?現在のところ、ページを更新するだけです。 RegistersUsers.php/register(Request $ request)に向かう代わりに。Laravel 5.2 Auth Registration Redirect

Route::group(
[ 
    'prefix' => LaravelLocalization::setLocale(), 
    'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'web' ] 
], 
function() 
{ 
    Route::group(['prefix' => 'wholesale'], function() { 
     // Authentication Routes... 
     Route::get('login', 'Auth\[email protected]'); 
     Route::post('login', 'Auth\[email protected]'); 
     Route::get('logout', 'Auth\[email protected]'); 

     // Registration Routes... 
     Route::get('register', 'Auth\[email protected]'); 
     Route::post('register', 'Auth\[email protected]'); 

     // Password Reset Routes... 
     Route::get('password/reset/{token?}', 'Auth\[email protected]'); 
     Route::post('password/email', 'Auth\[email protected]'); 
     Route::post('password/reset', 'Auth\[email protected]'); 
     Route::get('/', '[email protected]'); 
     Route::get('/', '[email protected]'); 
    }); 

}); 

ブレード

<form class="form-horizontal" role="form" method="POST" action="{{ url('wholesale/login') }}"> 

EDIT

私はそれはアプリがまだ提出し、フォーム上の代わりにポストのGETメソッドを使用します

Route::post('register', 'Auth\[email protected]'); 

としなければならないと考えています。私は「EN」部分をハードコーディングする必要があります質問

action="{{ url('en/wholesale/register') }}" 

の一部は、中に次の機能へのルートに、一部ができる方法がある解決

EDIT 2

OK自動的にルートになりますか?

+0

フルフォームとコントローラーを見せて問題を説明してくださいpls –

+0

@AchrafKhouadja 2nd EDITをご覧ください。すべてのコントローラーは 'php artisan make:auth'に付属のデフォルトです。変化する。 – aahhaa

+0

これを修正しましたか?私は同じ問題を抱えている – Augusto

答えて

0

Laravelのデフォルト認証を使用すると、すべてのログインと登録ルートが登録されているので、router.phpファイルが表示され、Route::auth()のroutes.phpファイルで呼び出すことができます。 AuthenticatesUsersまたはRegistersUsersの特性をauthController.phpがAuthenticatesAndRegistersUsersの特性を使用して認証を設定するのを見たいと思うかもしれません。それが役に立てば幸い。