Skip to content

this describes how to configure subdomain for laravel project.

Notifications You must be signed in to change notification settings

hillbilly300/laravel-sub-domain-cpanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

laravel-sub-domain-cpanel

this guide describes how to configure subdomain for laravel project.

Using example.com if you own example.com and want to create subdoamin.example.com and handle it with laravel. then follow these steps.

  1. Create sub domain in cpanel and point its directory to laravel project directory.
  2. now in your routes/web.php add this snippet.
/*subdoamin*/
Route::domain('subdoamin.example.com')->group(function () {
    //mobile routes
    Route::get('/', function(){
        dd("Reserved For subdoamin.example.com Site") ;
    });
  }
);

Now visit

subdoamin.example.com

and you will get

Reserved For subdoamin.example.com Site

About

this describes how to configure subdomain for laravel project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published