For last 3 day I am trying to install laravel 5.5 in my system(windows 8.1) through composer and getting series of errors one after other. So I am asking some questions in order to clear my doubts which are still doubt after more than 20-25 hour of research on various blogs and SO.
- I have installed php 7 in c:\php.
- After that I have installed composer using composer installer and did nothing after that, like setting PATH on environment setting.
-
I found that I have to create a composer.json file which I have copied from Github and shown below, but I don't know where to keep this composer.json file so I created this file on C:\Users\MyPC (i.e. my home directory).
{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=7.0.0", "fideloper/proxy": "~3.3", "laravel/framework": "5.5.*", "laravel/tinker": "~1.0" }, "require-dev": { "filp/whoops": "~2.0", "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~6.0" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "extra": { "laravel": { "dont-discover": [ ] } }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate" ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true } }
Please check the code above if I have committed any mistake.
- After that I executed "composer update" command which downloaded a lot of files and placed in C:\Users\MyPC\vendor folder (I think), but throws an error at last which I can't remember.
- After that I executed "composer install" command and get this error shown below.
This is my problem and I am not able to figure out what to do.
I have a couple of more doubt:
i- composer create-project --prefer-dist laravel/laravel NAME_OF_PROJECT
can also be used to set up new project then why we use composer global require “laravel/installer”
and then laravel new NAME_OF_PROJECT
method. What are the benefits of using this method.
ii- What are the steps to follow after the installation of composer using installer for setting up a new laravel project. What are the best practices to structure the project folder.
Please help me. I am learning laravel but don't know how to deal with this composer stuff and installing laravel as most or all of the tutorial starts with creating new project file .they don't teach how to install them.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2guz8du
via IFTTT
Aucun commentaire:
Enregistrer un commentaire