I need structure tips before I create my personal website using Laravel 5.3.
- Should I use a separate Laravel install for my subdomain backend to be safer or should I only use one Laravel install and do the routes below?
- Which is the best practice and easier to maintain?
- Should I use subdomain for my Backend Admin or just use sub-folder
(www.domain.com/admin)
MY CURRENT STRUCTURE BELOW
Preferred URLs:
- http://www.domain.com (Frontend)
- http://admin.domain.com (Backend)
Controllers:
app\Http\Controllers\Admin\AdminController.php (Backend)
app\Http\Controllers\HomeController.php (Frontend)
Routes File:
Route::group(array('domain' => 'domain.com'), function() {
Route::get('/', 'HomeController@index');
});
Route::group(array('domain' => 'admin.domain.com'), function() {
Route::get('/', 'Admin\AdminController@index');
});
VHOST:
127.0.0.1 domain.com
127.0.0.1 admin.domain.com