Routing to subdomain does not work laravel 8

  apache, laravel, php, routes, subdomain

When switching to a subdomain page endless load nothing happens, no errors.

My httpd.conf

<VirtualHost *:8000>
    ServerAlias *
    DocumentRoot "/var/www/html/blog/public"

hosts file   localhost   *


Route::get('/', function () {
  return view('home.home');

Route::domain('{username}.'.env('SESSION_DOMAIN'))->group(function () {
  Route::get('/', [PostController::class,'getAllPosts'])

in .env

I do not understand what is wrong, please help me.

Source: Laravel

Leave a Reply