0

These codes which I have written terminal

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

mv composer.phar /usr/local/bin/composer

Composer is working.

After that I downloaded laravel without error.

composer global require "laravel/installer"

But When I write ~/.composer/vendor/bin/laravel in terminal it gives me error

bash: /root/.composer/vendor/bin/laravel: No such file or directory

Where is my problem?I dont get it.

EDIT:

find /root/ -name laravel

./.config/composer/vendor/bin/laravel
./.config/composer/vendor/laravel
./.config/composer/vendor/laravel/installer/laravel
./.cache/composer/files/laravel
eoweww
  • 117
  • 2
  • 11
  • 1
    Can you run `composer create-project --prefer-dist laravel/laravel blog`? – spicydog Nov 01 '16 at 10:01
  • @spicydog yes it is working(Created project in blog ...)Also please check my question I also shared find -name laravel command – eoweww Nov 01 '16 at 10:05
  • 1
    I don't know why you are looking for the files in `/root/.composer/` It should be in your Laravel isn't it? Suppose that you have run my command, you will get `blog` directory. After that, go into that directory and run `php artisan serve`. The Laravel should be online. Have you check Laravel documents yet? https://laravel.com/docs/5.3 – spicydog Nov 01 '16 at 10:11
  • @spicydog Yes I am online http://localhost:8000/ thank you for help – eoweww Nov 01 '16 at 10:15
  • Sure, I will write it as the answer then – spicydog Nov 01 '16 at 10:16

1 Answers1

1

You can simply run composer create-project --prefer-dist laravel/laravel blog to install Laravel in blog directory.

Then you go into blog directory and run php artisan serve. Now your Laravel should already be online.

Check this document for the Laravel installation https://laravel.com/docs/5.3/#installing-laravel.

spicydog
  • 1,644
  • 1
  • 17
  • 32