1. Set up a new site on Laravel

    Ensure to use to use a PHP version greater than 7.2.5

  2. Bash into the site (right click on container - Open Site SSH)

  3. Download the installer

    https://getcomposer.org/installer

  4. Copy installer to /app folder (in Explorer)

  5. Bash into the /app folder and run the following commands..

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php --install-dir=../bin --filename=composer
    php -r "unlink('composer-setup.php');"
  6. Install Laravel globally

    composer global require laravel/installer
  7. Run the following commands so that Laravel can be accessed via the terminal

    export PATH="~/.composer/vendor/bin:$PATH"
    source ~/.bashrc

    OR FOR SOME LINUX SETUPS

    export PATH="~/.config/composer/vendor/bin:$PATH"
    source ~/.bashrc
  8. Delete the public folder within project name/app (via windows explorer)

  9. Return to the bash and revert to the parent folder

    cd ..
  10. Create a new laravel project

    laravel new app --force
  11. Update .env

    DB_CONNECTION=mysql
    DB_HOST=localhost
    DB_PORT=3306
    DB_SOCKET="/Users/yourusername/Library/Application Support/Local/run/lkIEkdiowIEkmd/mysql/mysqld.sock"
    DB_DATABASE=local
    DB_USERNAME=root
    DB_PASSWORD=root
  12. Make fix for mariadb

    Update app/Providers/AppServiceProvider.php (add following code)

    use Illuminate\Support\Facades\Schema;

    public function boot()
    {
    Schema::defaultStringLength(191);
    }
  13. Run migrations

    php artisan migrate
  14. Stop local site and delete /app folder (use rimraf if experiencing issues)

  15. Pull repo into a new /app folder

  16. Start site and install packages via the bash

    cd /app
    composer install
  17. Run migrations (FRESH)

    php artisan migrate:fresh