1

In my site (school management system) , i want to generate mini-site for each of the teacher and the admin member. Where the teachers and the admin member can put there task and other things.By using sub domain, i want to get this mini-site. So, how can i get this sub domain and how to access that sub domain?

MuTiny
  • 261
  • 1
  • 7
  • 23
abdtpbd
  • 51
  • 3

1 Answers1

1

You can follow the documentation for sub-domain routing: https://laravel.com/docs/5.2/routing#route-group-sub-domain-routing

Route::group(['domain' => '{account}.myapp.com'], function () {
    Route::get('user/{id}', function ($account, $id) {
        //
    });
});

Don't forget to configure NGINX or Apache to properly handle sub-domains as well. Good Luck !

Christophe Hubert
  • 2,833
  • 1
  • 12
  • 25