Installed laravel using composer
composer create-project laravel/laravel project_name For cleanliness, I changed the structure of the project to such a form.
project_name/laravel/ project_name/vendor/ project_name/public/ project_name/composer.json In the project_name / laravel / folder I moved all the files and folders of the laravel itself.
The file composer.json led to this:
{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=5.5.9", "laravel/framework": "5.2.*" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~4.0", "symfony/css-selector": "2.8.*|3.0.*", "symfony/dom-crawler": "2.8.*|3.0.*" }, "autoload": { "classmap": [ "laravel/", "laravel/database" ], "psr-4": { "App\\": "laravel/app/" } }, "autoload-dev": { "classmap": [ "laravel/tests/TestCase.php" ] }, "scripts": { "post-root-package-install": [ "php -r \"copy('laravel/.env.example', 'laravel/.env');\"" ], "post-create-project-cmd": [ "php laravel/artisan key:generate" ], "post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall", "php laravel/artisan optimize" ], "post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php laravel/artisan optimize" ] }, "config": { "preferred-install": "dist" } } When you run composer install gives an error
Script php laravel/artisan optimize handling the post-install-cmd event returned with an error [RuntimeException] Error Output: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]... Where else to fix the way?