Undefined index: driver for Laravel 5 deploy

578 views Asked by At

I created a brand new Laravel 5 project with this short shell script (gist link) and created an app on Fortrabbit to deploy it to. When I checked everything into git and pushed it up I got the below error:

Deployment file:
  not found

Pre-script:
  not found
  0ms

Composer:
  - - -
  Loading composer repositories with package information
  Installing dependencies (including require-dev) from lock file
  Nothing to install or update
  Generating optimized autoload files
  > Illuminate\Foundation\ComposerScripts::postInstall
  > php artisan optimize



    [ErrorException]         
    Undefined index: driver  



  Script php artisan optimize handling the post-install-cmd event returned with error code 1

  - - -


A B O R T E D

  !! Failure in build execution: Failure in composer execution

My composer.json is the default from the Laravel install:

"scripts": {
    "post-root-package-install": [
        "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},

What is causing this error and how do I fix it? Thank you

0

There are 0 answers