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
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
| . |
| sed -i "/^uuid:/d;/^_core:/d;/^ default_config_hash:/d" * |
| #!/usr/bin/bash | |
| # Download zeromq | |
| # Ref http://zeromq.org/intro:get-the-software | |
| wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
| # Unpack tarball package | |
| tar xvzf zeromq-4.2.2.tar.gz | |
| # Install dependency |
| <?php | |
| // Import arbitrary config from a variable. | |
| // Assumes $data has the data you want to import for this config. | |
| $config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html'); | |
| $config->setData($data)->save(); | |
| // Or, re-import the default config for a module or profile, etc. | |
| \Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module'); |
| <?php | |
| use Symfony\Component\Yaml\Yaml; | |
| global $config_directories; | |
| $config_name = drush_shift(); | |
| if (!isset($config_directories[$config_name])) { | |
| print "No such config directory $config_name\n"; | |
| exit; | |
| } |
| #!/usr/bin/env zsh | |
| sudo rm -f /usr/bin/node | |
| sudo rm -f /usr/bin/npm | |
| sudo ln -s $(which node) /usr/bin/ | |
| sudo ln -s $(which npm) /usr/bin/ |
| echo '' >> $HOME/.bashrc | |
| echo 'function composer() { COMPOSER="$(which composer)" || { echo "Could not find composer in path" >&2 ; return 1 ; } && sudo phpdismod -s cli xdebug ; $COMPOSER "$@" ; STATUS=$? ; sudo phpenmod -s cli xdebug ; return $STATUS ; }' >> $HOME/.bashrc | |
| echo 'function drush() { DRUSH="$(which drush)" || { echo "Could not find drush in path" >&2 ; return 1 ; } && sudo phpdismod -s cli xdebug ; $DRUSH "$@" ; STATUS=$? ; sudo phpenmod -s cli xdebug ; return $STATUS ; }' >> $HOME/.bashrc | |
| echo 'function drupal() { DRUPAL="$(which drupal)" || { echo "Could not find drupal in path" >&2 ; return 1 ; } && sudo phpdismod -s cli xdebug ; $DRUPAL "$@" ; STATUS=$? ; sudo phpenmod -s cli xdebug ; return $STATUS ; }' >> $HOME/.bashrc | |
| echo '' >> $HOME/.bashrc |
| {# Get URL of single file field #} | |
| {{ node.field_file.entity.uri.value }} | |
| {# Get URL of multi file field #} | |
| {{ node.field_file['#items'].entity.uri.value }} | |
| {# Trun into link #} | |
| {{ file_url(node.field_file.entity.uri.value) }} | |
| {# Check if there is at least one value #} |
| <?php | |
| /** | |
| * Form controller for the bb_report entity edit forms. | |
| * | |
| * @ingroup report | |
| */ | |
| class FeeForm extends ContentEntityForm { | |
| /** | |
| * {@inheritdoc} |