Create a Project

Make sure you are in the directory where you will create the project folder. If using XAMPP, change directory to htdocs.

composer create-project laravel/laravel projectname

or

laravel new projectname

Run the Server

php artisan serve

Create a new middleware

php artisan make:middleware mymiddleware