Thank you for helping us help you help us all
- Install WSL Ubuntu to run these commands
sudo apt-get updatesudo apt install software-properties-commonsudo add-apt-repository ppa:ondrej/php- PHP is needed to install COMPOSER but can be removed after
sudo apt-get updatesudo apt install php7.4php -v- To ensure that it's installed properly
sudo apt-get install -y php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath- Install Composer:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"php composer-setup.php
- Clone this repository
- You can access the repo folder through
mntin WSL to access Windows data from WSL composer updatecomposer install- if
chmod(): Operation not permittedis thrown, run with sudosudo php artisan package:discover --ansi - At this point you should have PHP in SAIL and you can remove PHP:
sudo apt remove php* cdinto project's foldersail composer updatesail composer installcp .env.example .env- Edit settings in
.envfile, if needed
- Edit settings in
sail php artisan key:generateEdit .env filesail php artisan migratesail php artisan db:seed./vendor/bin/sail up./vendor/bin/sail npm install./vendor/bin/sail npm run watch- Optionally, you can make an
aliasto only typesailinstead of./vendor/bin/sailby runningnano ~/.bashrcand adding this line:alias sail='/vendor/bin/sail' - You an also make an alias for the project folder to not have to
cdinto it everytime - In Visual Studio Code, you can Press F1:
Remote WSLto open a Visual Studio instance with access to theWSLconsole- You need to download
WSLextension for this
- You need to download
- Optionally, you can make an