Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel PHP: multiple project run at the same time

I want to run multiple laravel frame work project at the same time.Exactly how to do it I dont know.

I used a command : php artisan serv --port=8080 , to run another project at port 8080. when I use this command into the cmd it shows the error:

enter image description here

like image 588
SOURAV Avatar asked Dec 05 '22 04:12

SOURAV


2 Answers

1st project

php artisan serve

it will automatically assign port 8000 as http://127.0.0.1:8000

2nd project at the same time should be on different port 8080 like following

php artisan serve --port=8080

you can run "n" number of projects on different ports.

like image 188
Vikas Dwivedi Avatar answered Dec 13 '22 06:12

Vikas Dwivedi


Looks to me like you need to run

$ composer install

As Laravel cannot find composers autoloader.

Another thing, with your tags, if you're using Laravel 5, then you should now L5 doesn't come with the serve command anymore. Laravel is pushing Homestead, and you should be moving to Homestead for your local development anyhow.

If you'd rather stick with your PHP installation, use the following command to do that:

$ php -S localhost:8080 -t public

One last thing, the server option in L4's artisan is spelled "serve"

like image 20
Pazuzu156 Avatar answered Dec 13 '22 05:12

Pazuzu156