How do I require authentication for a set of routes associated with a subdomain?
Answer / Girish Candra Sharma
To require authentication for routes associated with a subdomain, you can create a new route group and apply the `auth` middleware to it. Here's an example:nn```phpn// app/Http/routes.phpnuse IlluminateSupportFacadesRoute;nnRoute::domain('{subdomain}.example.com', function () {n Route::middleware(['auth'])->group(function () {n // Your routes heren });n});n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Who are Manually Authenticating Users in Laravel ?
What is a recursive helper function?
What is an observer?
What are advantages of laravel?
Explain auth.
What is auth? How is it used?
List some default packages provided by laravel 5.6?
How do I populate my database with sample data?
What is auth api laravel?
How to launch vagrant box?
What is url in laravel?
What is database migration. How to create migration via artisan?