title: Installing Laravel using Composer through PhpStorm
body: <p>I have checked out many examples of this but for some reason, either I am missing an assumed step or I'm just doing it wrong. </p>
  
  <p>So I am having issues getting Laravel installed locally. I have a <code>composer.json</code> and .phar file.</p>
  
  <p>I have ran <code>php composer install</code> which downloaded the dependencies. However, this is where it gets different. Seems at this point all the examples I have found are magically working. However in mine, I have a vendor directory with all the dependencies but nothing is actually installed. I have the Laravel source but its not ready for development yet.</p>
  
  <p>Does this make sense? Am I over complicating things?</p>
  
  <p>I am now getting an error: </p>
  
  <blockquote>
    <p>Script php artisan optimize handling the post-update-cmd event returned with error code 1</p>
  </blockquote>
  
  <p>which after checking, that method is there...</p>
  
  <p><strong>My composer.json:</strong></p>
  
  <pre><code>{
  "name": "laravel/laravel",
  "description": "The Laravel Framework.",
  "keywords": ["framework", "laravel"],
  "license": "MIT",
  "type": "project",
  "require": {
    "php": "&gt;=5.6.4",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0",
    "barryvdh/laravel-cors": "^0.8.2"
  },
  "require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7"
  },
  "autoload": {
    "psr-4": {
      "App\\": "app/"
    }
  },
  "autoload-dev": {
    "psr-4": {
      "Tests\\": "tests/"
    }
  },
  "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"
    ]
  },
  "config": {
    "preferred-install": "dist"
  }
  </code></pre>
  
  <p>}</p>