1

Initially, I will install Laravel and set it up for a new website called admin.example.com. This will be a simple dashboard just for my use. Next I want to set up www.example1.com with all of the functionality for ecommerce, inventory control, user management, etc. Once that is up and running, I will set up www.example2.com.

Can all of these various websites share the same models, views, and controllers?

edukondalu
  • 29
  • 3
  • Possible duplicate of [Can I group multiple domains in a routing group in Laravel?](http://stackoverflow.com/questions/18603330/can-i-group-multiple-domains-in-a-routing-group-in-laravel) – CodeBrauer Nov 15 '16 at 08:09

1 Answers1

2

You should use route groups and domain property for that:

Route::group(['domain' => 'example.com')], function () {
    // All routes for the first domain go here.
}
Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279