php artisan serve
Create Controller
Create a blank controller:
php artisan make:controller PostsController
Create a new controller with methods:
php artisan make:controller --resource PostsController
Create new Laravel project
Create the project
Typical way
Open cmd or git bash and find the directory you want to install the Laravel project into. Then just add this line:
composer create-project laravel/laravel example-app
This will create a new project that’s inside folder example-app. When its done installing you will go into the folder to access the project
Quicker Way
Add this to git bash:
composer global require laravel/installer
To update this after its installed do this:
composer global update laravel/installer
Now write the name of your new project:
laravel new example-app
Create Database
Create a new database in PHPMySQL
Add that info into the .env file so project can access the database.
Open in Visual Studio Code
Right click on project folder and choose Open with Code
Type this in the terminal:
php artisan serve