Ad
Laravel Subdomain
I'm developing a project using the Laravel framework, the project is hosted on the shared host, now I would need to have a subdomain to be able to manage the "admin" section, I created my subdomain, you can use the Laravel project which is it on my main domain also on the new subdomain so that I can use the same database and the same files?
Ad
Answer
Yes, you can use the same DB and files. You may use subdomain routing to handle your subdomain URIs:
Route::domain('admin.myapp.com')->group(function () {
Route::get('users', function () {
//
});
});
Note: You should point your subdomain to your main domain, you may use CNAME *.myapp.com. myapp.com.
or config the webserver (e.g. nginx, apache, etc.) to do this.
Ad
source: stackoverflow.com
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
Ad