Skip to content

long-blade/lando-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lando Recipe for Laravel

I’ve become a big fan of using Lando for constructing my local dev environment. Lando is, as its website says, “a free, open source, cross-platform, local development environment and DevOps tool built on Docker container technology and developed by Tandem. Designed to work with most major languages, frameworks and services, Lando provides an easy way for developers of all skill levels to specify simple or complex requirements for their projects, and then quickly get to work on them.”

Begin by checking out

Configuration

First of all you need to configure some settings such as the name of your application and your database port. Go to your .lando.local.yml file and add your configurations.

name: laravel-example
services:
  database:
    portforward: 13306
proxy:
  appserver:
    - laravel-example.lando.site # You can add custom domain like *example.local*

If you add a custom domain that is not ending in lando.site for example laravel-example.local you have to update /etc/hosts file like 127.0.0.1 laravel-example.local. Please read the Lando Documentation for more info.

Installation & Initialize Environment

To start building lando env for lando, simple go to your directory which contains the .yml files and in the terminal run the following commands.

$ lando start
$ lando new-project
$ lando restart

$ lando info ## To see the info about your environment like database credentials.

The lando new-project will install your laravel fraimwork in the www directory.

Boomshakalaka!! Don't forget to update your .env file with correct database credentials.

Usage & Tooling

Creating new laravel application files.
$ lando new-project # Creates a new laravel application files in the www directory.
Installing nodejs into the docker container.
$ lando install-node # Installs node for the current container not to the global dir
Running npm run in /www/ directory .
$ lando run-npm

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Releases

No releases published

Packages

No packages published

Languages