2017-12-26 19 views

答えて

1

LaravelのAuth::routes();あなたはこの機能の内容をコピーしてweb.phpファイルに直接貼り付けることができvendor/laravel/framework/src/Illuminate/Routing/Router.php

で定義された関数auth()を使用してリダイレクトを上書きすることができます必要に応じて更新してください。

public function auth() 
{ 
    // Authentication Routes... 
    $this->get('login', 'Auth\[email protected]')->name('login'); 
    $this->post('login', 'Auth\[email protected]'); 
    $this->post('logout', 'Auth\[email protected]')->name('logout'); 

    // Registration Routes... 
    $this->get('register', 'Auth\[email protected]')->name('register'); 
    $this->post('register', 'Auth\[email protected]'); 

    // Password Reset Routes... 
    $this->get('password/reset', 'Auth\[email protected]')->name('password.request'); 
    $this->post('password/email', 'Auth\[email protected]')->name('password.email'); 
    $this->get('password/reset/{token}', 'Auth\[email protected]')->name('password.reset'); 
    $this->post('password/reset', 'Auth\[email protected]'); 
} 

ここでは、/registerの経路を変更することができます。これを行うときにAuth::routes()ヘルパーをweb.phpから削除することを忘れないでください。

0

ゴーあなたが

class RegisterController extends Controller 
{ 
    /* 
    |-------------------------------------------------------------------------- 
    | Register Controller 
    |-------------------------------------------------------------------------- 
    | 
    | This controller handles the registration of new users as well as their 
    | validation and creation. By default this controller uses a trait to 
    | provide this functionality without requiring any additional code. 
    | 
    */ 

    use RegistersUsers; 

    /** 
    * Where to redirect users after login/registration. 
    * 
    * @var string 
    */ 
    protected $redirectTo = '/'; 
関連する問題