Hi I've recently downloaded Laravel as a PHP framework, I've installed composer and have got that working, I've got it to create my project as per the Laravel website
composer create-project laravel/laravel --prefer-dist
However when I use the above line this installs my project in the c:\users\guti directory however I want it to be installed in c:\xampp\htdocs.
I've seen another question on stackoverflow and it talks about amending the composer.json file but I'm not sure whether this is the route I should be taking as I've done a computer search for this file and this file exists as part of the laravel framework so does it make sense to amend this file?
Any composer experts on hand to point me in the right direction?
Composer can be configured to install packages to a folder other than the default vendor folder by using composer/installers. Now when your theme is installed with Composer it will be placed into wp-content/themes/themename/ folder. Check the current supported types for your package.
Composer is not a package manager in the same sense as Yum or Apt are. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor ) inside your project. By default, it does not install anything globally.
composer create-project laravel/laravel .
Installs in your current directory =)
You should specify your destination directory where you want to create the project, from the command prompt, type cd C:\xampp\htdocs
then press enter. After that, type following code on the command prompt and press enter
composer create-project laravel/laravel my-laravel-project
Here my-laravel-project
will be your project folder. The composer.json
file is used to setup some configurations (for Dependency management) during installation of the package via packagist. Visit getcomposer.org for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With