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.
- PHP 8.3
- Laravel 11.x
- Laravel Sail (docker)
- Laravel Backup (from spatie)
- Filament PHP (admin dashboard)
- Filament Shield (roles and permissions)
- Devcontainer for Visual Studio Code
- GIthub Actions for CI/CD on Github
By default there are 3 types of roles:
- Admin
- Moderator
- User
Follow the steps below to get started with the Laravel template project.
-
Clone the repository
-
Open a terminal and navigate to the laravel folder
-
Copy the
.env.example
file to.env
:
cp .env.example .env
- 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
- Change the name in
docker-compose.yml
:
---
name: 'template'
- Start the development server:
./vendor/bin/sail up -d
- Install the composer dependencies and generate a new application key:
./vendor/bin/sail composer install && php artisan key:generate
- Run the database migrations and seed the database:
./vendor/bin/sail php artisan migrate --seed
- Build the frontend assets:
npm install && npm run dev
To create an admin user for the Filament dashboard, run the following command:
php artisan make:filament-user
To run the tests with Pest, run the following command:
./vendor/bin/sail pest --coverage
Distributed under the MIT License. See LICENSE
for more information.