...
4 Install Laravel globally (https://laravel.com/docs/5.8/installation)
Code Block composer global require laravel/installer
Add Laravel to global path by adding this line to .bashrc file
Code Block export PATH=~/.composer/vendor/bin:$PATH
5 Switch to a Windows system code folder
We want to create our code in Windows system, not WSL, so that we can access and edit the code using editor or IDE, and serve the project to localhost and open it on browsers in Windows system. One good option is the GitHub folder.
Code Block cd /mnt/c/Users/<netID>/Documents/<folder>
Set up an alias in .bashrc so that you don't have to type the command each time
Code Block alias <name>="cd /mnt/c/Users/<netID>/Documents/<folder>"
6 Start your first Laravel project and serve it
Code Block laravel new <project>
Local Development Server
If you have PHP installed locally and you would like to use PHP's built-in development server to serve your application, you may use the
serve
Artisan command. This command will start a development server athttp://localhost:8000
:Code Block php artisan serve
...