default route '/' is still listed on top of artisan route:list

I have a project that uses sub-domains.

Now, after following the RouteServiceProvider on how they map the Routes, I finally made a custom RouteServiceProvider for my Subdomains named SubdomainRouteServiceProvider.

Now, I also edited the config/app.php and set the SubdomainRouteServiceProvider ahead of RouteServiceProvider as shown below.

    App\Providers\SubdomainRoutesServiceProvider::class,


    /*
     * Application Service Providers...
     */
    App\Providers\AppServiceProvider::class,
    App\Providers\AuthServiceProvider::class,
    // App\Providers\BroadcastServiceProvider::class,
    App\Providers\EventServiceProvider::class,
    App\Providers\RouteServiceProvider::class,

Now when I typed in the artisan:route-list this shows.

|                         | GET|HEAD | / | Closure | web    |
| company-one.sample.test | GET|HEAD | / | Closure | web    |

Is there any thing I need to customize? Or any thing missing?

any help would be great!

Update!! Added Route Files

/*
 * Folder: app/Subdomain/CompanyOne/routes/web.php
 */
Route::domain('company-one.sample.test')->group(function() {
    Route::get('/', function() {
        return view('CompanyOne . views . welcome');
    });
});


/*
 * Folder: routes/web.php
 */
Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Auth::routes();

Route::get('/', function () {
    return view('welcome');
});

1 answer

  • answered 2018-07-11 02:44 Reyn

    I think, I was just fooled by looking at the route:list.

    when I typed the actual route it shows the page.