Skip to content

🛠️ Laravel (v11.x) boilerplate with Filament (v3.x), Spatie Permissions, Pest tests and more...

License

Notifications You must be signed in to change notification settings

klaasnicolaas/laravel-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ Laravel Template

Project Maintenance License

GitHub Activity GitHub Last Commit Contributors

Forks Stargazers Issues

About

This is a laravel template repository project, which can be used as a basis for future projects. Based on the TALL stack and packed with useful features to get started right away.

Features

The Laravel template project comes with the following features:

Roles and permissions

By default there are 3 types of roles:

  • Admin
  • Moderator
  • User

Getting started

Follow the steps below to get started with the Laravel template project.

Note

Make sure you have installed Laravel Sail globally on your system.

Setting up development environment

  1. Clone the repository

  2. Open a terminal and navigate to the laravel folder

  3. Copy the .env.example file to .env:

cp .env.example .env
  1. Uncomment and/or change the following lines in the .env file:
APP_NAME=Template

FORWARD_APP_PORT=80
FORWARD_DB_PORT=3306

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=sail
DB_PASSWORD=password
  1. Change the name in docker-compose.yml:
---
name: 'template'
  1. Start the development server:
./vendor/bin/sail up -d
  1. Install the composer dependencies and generate a new application key:
./vendor/bin/sail composer install
./vendor/bin/sail php artisan key:generate
  1. Run the database migrations and seed the database:
./vendor/bin/sail php artisan migrate --seed
  1. Build the frontend assets and watch for changes:
./vendor/bin/sail npm install
./vendor/bin/sail npm run dev

Create admin user

To create an admin user for the Filament dashboard, run the following command:

./vendor/bin/sail php artisan make:filament-user

Testing with Pest

To run the tests with Pest, run the following command:

./vendor/bin/sail pest --coverage

License

Distributed under the MIT License. See LICENSE for more information.