Laravel Subdomain - localhost

'name'     => 'Shah Md. Iktakhairul Islam',
'email' => '',
'password' => Hash::make('admin'),
'domain' => 'developer',
'role' => 'developer',
'weight' => 59.00,
'short_url' => env('SUB_URL', 'http://localhost'),
'domain' => env('SESSION_DOMAIN', ''),
Route::domain('{subdomain}.'.config('app.short_url'))->group(function () {    Route::resource('users', UserController::class);
Route::resource('products', ProductController::class);
public function index($subdomain)
$users = DB::table('users')->get();

return view("users.index", compact('users', 'subdomain'));
public function create($subdomain)
return view("users.create", compact('subdomain'));
} localhost127.0.0.1 laravel-sub-domain.com127.0.0.1
public function logout(Request $request)

return redirect()->to('');



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store