Below, I am outlining the steps I’ve followed to get up and running with a new Laravel project. I hope these steps will also help you while starting out with a new Laravel project of your own. Make sure you have an active internet connection and also installed composer in your system before proceeding.
Open a new terminal, change the directory to where you want to keep the source code, and run the below command to create a new Laravel app:
$ composer create-project laravel/laravel example-app
Add Laravel Breeze, a startup kit that is useful in scaffolding a fresh Laravel application. Breeze provides authentication features such as registration, login, password reset, email verification, and password confirmation.
$ cd example-app $ composer require laravel/breeze --dev
Install Laravel Breeze to your application. Make sure to enable Inertia stack by passing –inertia option to Breeze install command.
$ php artisan breeze:install --inertia
Inertia allows you to create fully client-side rendered, single-page apps without much of the complexity that comes with modern SPAs.
Compile your assets
$ npm install $ npm run dev
Configure your database (via .env) and run your database migrations
$ php artisan migrate
It will populate your database with the following tables:
failed_jobs, migrations, password_resets, personal_access_tokens, users
Finally, you may start Laravel’s local development server using the Artisan CLI’s serve command:
$ php artisan serve