Laravel

Laravel is a free, open-source PHP web framework created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern. It is the Ruby-on-Rails of PHP.

You can easily boot up a best practices stack to run and develop Laravel by adding the following to your app's .lando.yml.

name: myapp
recipe: laravel

But you likely want to configure this more.

Getting Started

This documentation is geared towards configuring the .lando.yml for the laravel recipe. If you just want to learn how to get up and running with a laravel app check out our Getting Start With Laravel Guide.

Example .lando.yml

# Laravel recipe
name: laravel

# Start with the default laravel recipe
recipe: laravel

# Configure the laravel recipe
config:

  # See: https://laravel.com/docs/5.4/installation#server-requirements

  # Optionally specify the php version to use.
  #
  # If ommitted this will default to the latest php version supported by laravel.
  # Consult the `php` service to see what versions are available. Note that all
  # such versions may not be supported in Laravel 7 so YMMV.
  #
  # See: https://laravel.com/docs/5.4/installation#server-requirements
  #
  # NOTE: that this needs to be wrapped in quotes so that it is a string
  #
  php: '7.0'

  # Optionally specify whether you want to serve drupal via nginx or apache
  #
  # If ommitted this will default to the latest apache
  #
  # See: https://laravel.com/docs/5.4/installation#web-server-configuration
  #
  via: nginx

  # Optionally specify the location of the webroot relative to your approot.
  # For Laravel this is usually 'public'
  #
  # If ommitted this will be your approot itself.
  #
  webroot: web/public

  # Optionally specify a primary database, this can be one of:
  #
  #   - `mysql`
  #   - `mariadb`
  #   - `postgres`
  #
  # If ommitted this will not install a db for you.
  #
  # see: https://laravel.com/docs/5.4/database#configuration
  #
  database: mariadb:10.1

  # Optionally specify a primary caching backend, this can be one of:
  #
  #   - `redis`
  #   - `memcached`
  #
  # If ommitted this will not install a db for you
  #
  # see: https://laravel.com/docs/5.4/cache#configuration
  cache: redis

  # Optionally activate xdebug
  #
  # If you are having trouble getting xdebug to work please see:
  # https://docs.devwithlando.io/services/php.html#using-xdebug
  xdebug: true

  # Optionally mix in your own config files
  #
  # If ommitted this will use "sane defaults" for your recipe type
  # conf:

    # For more information on setting these files check out the documentation
    # and examples
    #
    # Docs: https://docs.devwithlando.io/services/php.html
    # Examples: https://github.com/lando/lando/tree/master/examples
    #
    # server: config/laravel.conf
    # php: config/php.ini

    # For more information on setting these files check out the documentation
    # and examples for the relevant services:
    #
    # MySQL: https://docs.devwithlando.io/services/mysql.html
    # MariaDB: https://docs.devwithlando.io/services/mariadb.html
    # PostGres: https://docs.devwithlando.io/services/postgres.html
    #
    # Examples: https://github.com/lando/lando/tree/master/examples
    #
    # database: config/mysql

You will need to rebuild your app with lando rebuild to apply the changes to this file. You can check out the full code for this example over here.

Advanced Configuration

If you are looking to add additional services, tooling or proxy config check out the Custom Recipe Guide.

results matching ""

    No results matching ""