John Davidson

php - Laravel Subdomain Route URL

0 comments
Message:


Example route/web.php file


// base_url example.com
Route::domain('app.example.com')->group(function(){
Route::get('/','ExampleController@method')->name('home1');
});
Route::get('/','ExampleController@method')->name('home2');

How to make;



always.


When going from home1 to home2, the subdomain changes, but when changing from home2 to home1 it stays the same.



My Answer:
> Route::get('/', function () {
> return 'Welcome to the app subdomain!';
> });

Rate this post

4 of 5 based on 9320 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us