gizburdt released a cool Laravel package called Laravel Multisite. With this Laravel package, we can build multiple sites/sub-domains on one codebase.

Laravel codebase

Example:

Route::group([
    'domain' => 'blog.'.config('multisite.host'),
    'as' => 'blog.',
    'middleware' => 'site:blog'
], function () {

    Route::get('/', 'BlogController@homepage')->name('homepage');

});

The magic happens with the site middleware site:blog. This will tell your app that the routes within the group are belonging to the blog. It will provide a variable called $currentSite in all your views. There is also a config available, which you can access with Config::get('multisite.site').