How to create a Laravel project
How to create a New Laravel project
- Open command prompt and execute below command
composer create-project --prefer-dist laravel/laravel projectname
It will create a directory with Laravel files.
- Create a new Database for configuration Laravel application
- Open the .env file in any code editor, and set DB credentials
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_api
DB_USERNAME=root
DB_PASSWORD=
Now run you application using below command
php artisan serve
After running the command it will give a URL like : http://127.0.0.1:8000
You can access you application using this URL
For create tables in database run below command
php artisan migrate