source: https://medium.com/@jcandan/the-untold-path-to-laravel-on-lando-d633c9cb8e8a
$ lando init --recipe laravel --webroot public --name My\ Project
$ lando start
$ lando composer create-project --prefer-dist laravel/laravel my-project
We initiated our Lando configuration above the my-project directory, so let’s move .lando.yml into my-project/ and restart.
$ mv .lando.yml my-project/
$ cd my-project
$ lando restart
The last thing we need to do is to configure our environment settings. Laravel’s default configuration file specifies homestead as the database. We just need to edit the .env file with the following. Note these values can be seen via lando info.
# @file .env
APP_URL=http://myproject.lndo.site
DB_HOST=database
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=laravel
Then migrate the database schema.
$ lando artisan migrate
Log into virtual server and install Jetstream
lando ssh
composer require laravel/jetstream
php artisan jetstream:install livewire
Run NPM as requested (may need to be done from your command line, not the virtual one)
npm install && npm run dev
Then when you're ready to start writnig code, start Lando in normal fashion from your command line:
lando start
Keep a window up in the virtual server to run migrate commands
lando ssh
php artisan migrate
You can include the following to
.lando.yml
if you want Node as a service and use NPM accordingly