0

I have two domains: account.asu.dev and asu.dev

I want to use a subdomain for auth. Something like that: auth.asu.dev. In routes/web.php I have Auth::routes(); Where I can edit the default path of auth?

2
  • Which version you are using of laravel 5.*? Commented Feb 20, 2017 at 14:01
  • I'm using version 5.4 Commented Feb 20, 2017 at 14:02

1 Answer 1

1

Step 1 : Add following method to your app\Http\Controller\Auth\LoginController.php

/** * Show the application's login form. * * @return \Illuminate\Http\Response */ public function showLoginForm(){ return view('auth.login'); } 

Step 2 : Add following route to your routes\web.php

Route::get('subdomain-group/login', 'Auth\LoginController@showLoginForm'); 

You can use group to add specific route for subdomain.


Edited :

Enter custom routes in side group as below

Route::group(array('domain' => 'account.asu.dev'), function() { //Routes }); 
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.