title: Not able to install composer in laravel project
body: <p>I am new in <code>Php</code> and start working on <code>laravel</code> based project but facing one issue when installing <code>composer</code> on project level (I am using <code>Phpstrom</code> Ide).</p>
  
  <blockquote>
    <p>composer install --no-interaction --ansi  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  Script php artisan optimize handling the post-install-cmd event returned with error code 1  Failed to install
    packages for  ./composer.json.</p>
  </blockquote>
  
  <p>Process :-</p>
  
  <ol>
  <li>Install composer and wamp server</li>
  <li>Hit this command in order to create laravel project </li>
  </ol>
  
  <blockquote>
    <p>composer create-project laravel/laravel --prefer-dist</p>
  </blockquote>
  
  <p>and project is created with this error and no vendor folder is created</p>
  
  <blockquote>
    <p>Installing laravel/laravel (v5.4.30)
      - Installing laravel/laravel (v5.4.30): Downloading (100%) Created project in C:\wamp64\www\laravel</p>
    
    <blockquote>
      <p>php -r "file_exists('.env') || copy('.env.example', '.env');" Script php -r "file_exists('.env') || copy('.env.example', '.env');" handling
      th e post-root-package-install event returned with error code 1</p>
    </blockquote>
  </blockquote>
  
  <ol start="4">
  <li>I hit the composer command for Install and get first issue in this post</li>
  </ol>
  
  <p>Composer -v</p>
  
  <blockquote>
    <p>PHP temp directory (D:\mysql\temp) does not exist or is not writable
    to Composer . Set sys_temp_dir in your php.ini
    Composer version 1.6.5 2018-05-04 11:44:59</p>
  </blockquote>
  
  <p>composer -version</p>
  
  <blockquote>
    <p>PHP temp directory (D:\mysql\temp) does not exist or is not writable
    to Composer . Set sys_temp_dir in your php.ini</p>
    
    <p>[Symfony\Component\Console\Exception\RuntimeException]   The "-e"
    option does not exist.</p>
    
    <p>Exception trace:  () at
    phar://C:/composer/composer.phar/vendor/symfony/console/Input/ArgvInput.p
    hp:124 
    Symfony\Component\Console\Input\ArgvInput->parseShortOptionSet() at
    phar://C:/c
    omposer/composer.phar/vendor/symfony/console/Input/ArgvInput.php:105 
    Symfony\Component\Console\Input\ArgvInput->parseShortOption() at
    phar://C:/comp
    oser/composer.phar/vendor/symfony/console/Input/ArgvInput.php:84 
    Symfony\Component\Console\Input\ArgvInput->parse() at
    phar://C:/composer/compos
    er.phar/vendor/symfony/console/Input/Input.php:54 
    Symfony\Component\Console\Input\Input->bind() at
    phar://C:/composer/composer.ph
    ar/vendor/symfony/console/Command/Command.php:200 
    Symfony\Component\Console\Command\Command->run() at
    phar://C:/composer/composer
    .phar/vendor/symfony/console/Application.php:843 
    Symfony\Component\Console\Application->doRunCommand() at
    phar://C:/composer/com
    poser.phar/vendor/symfony/console/Application.php:193 
    Symfony\Component\Console\Application->doRun() at
    phar://C:/composer/composer.p
    har/src/Composer/Console/Application.php:251 
    Composer\Console\Application->doRun() at
    phar://C:/composer/composer.phar/vendo
    r/symfony/console/Application.php:117 
    Symfony\Component\Console\Application->run() at
    phar://C:/composer/composer.pha
    r/src/Composer/Console/Application.php:100 
    Composer\Console\Application->run() at
    phar://C:/composer/composer.phar/bin/com poser:59  require() at
    C:\composer\composer.phar:24</p>
    
    <p>list [--xml] [--raw] [--format FORMAT] [--] []</p>
  </blockquote>