Laravel starter kit
Set up the Laravel starter kit locally, review the default configuration, and start building with sensible defaults in minutes.
Getting started
If you are already comfortable with Laravel, you can skim this section. Otherwise, follow the steps below to get the starter kit running locally.
First, extract the zip file, open the project folder in your terminal, and install the dependencies:
After the installation is complete, copy the example environment file and generate an application key:
Database setup
By default, this starter kit uses SQLite, so it works out of the box without any extra configuration.
If you prefer Postgres, update your .env file and set the appropriate values:
Replace your_database, DB_USERNAME, and DB_PASSWORD with your PostgreSQL credentials.
Then run the database migrations:
This project ships with roles and a user list. To quickly get an admin account and example users, run:
The command will ask for your name, email, and password for the administrator account, then create 50 example users.
Serving the application
If you are using Herd, you can open the app by visiting your-project.test in your browser.
If you are using the built-in Laravel development server, run:
Email verification
Laravel ships with built in email verification. To enable it in this starter kit, you need to do two things.
First, mark your User model as MustVerifyEmail:
Second, configure a mailer. For local development, you can use Mailpit. Install it on your machine, then add this to your .env file:
Some of these values are null on purpose because Mailpit does not require authentication.
Run mailpit
Once your configuration is ready, start Mailpit from your terminal:
If everything is set up correctly, you should see output similar to this:
Then open your browser and visit http://localhost:8025/ to access the Mailpit web interface and inspect outgoing emails.
Layout
This starter kit includes three layouts:
GuestLayoutfor unauthenticated pagesDashboardLayoutfor authenticated dashboard pagesAppLayoutfor public pages
If you do not need a dashboard layout, you can remove the DashboardLayout component and use AppLayout for all pages. For example, here is a profile page using DashboardLayout:
To use AppLayout instead, change it to:
Quick login
To quickly test different users, you can visit a URL like http://localhost:8000/dev/login/5 to log in as the user with ID 5. Change the number at the end of the URL to log in as another user.
This feature is only available in the local environment. If you want to remove it, delete the routes/dev.php file and remove its require entry from routes/web.php.