how to create a project in laravel code example
Example 1: create laravel 6 project using composer
composer create-project --prefer-dist laravel/laravel blog "6.*"
Example 2: composer create project laravel 7
composer create-project --prefer-dist laravel/laravel:^7.0 blog
Example 3: laravel create project
// To install and use a specific version, you can enter it at the end of the command.
// For example using version 5.8 ==>
composer create-project --prefer-dist laravel/laravel projectName "5.8.*"
Example 4: how to start composer in laravel project on localhost
php artisan serve
/*
To START composer in project folder on MacOS:
The original answer is:
The full command works like this:
php artisan serve --host=<host IP address> --port=<port to use>
php artisan serve --host=127.0.0.1 --port=8080
AFTER: php artisan serve TERMINAL SHOWS:
Laravel development server started: <http://127.0.0.1:8000>
IN WEB BROWSER ENTER THE:
http://127.0.0.1:8000 , OR:
http://localhost:8000/
AND YOU ARE IN ! ! !
*/
http://127.0.0.1:8000/
http://localhost:8000/
Example 5: how to start composer in laravel project on localhost
php artisan serve
// The original answer is:
/*
The full command works like this:
php artisan serve --host=<host IP address> --port=<port to use>
php artisan serve --host=127.0.0.1 --port=8080
*/
Example 6: laravel new project
composer create-project laravel/laravel --prefer-dist laravel-socialite-login-facebook-example