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.
The Laravel template project comes with the following features:
- PHP 8.3
- Laravel 11.x
- Laravel Sail (docker)
- Laravel Backup (from spatie)
- Log Viewer
- Clockwork (debugging)
- 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.
Note
Make sure you have installed Laravel Sail globally on your system.
-
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
./vendor/bin/sail php artisan key:generate
- Run the database migrations and seed the database:
./vendor/bin/sail php artisan migrate --seed
- Build the frontend assets and watch for changes:
./vendor/bin/sail npm install
./vendor/bin/sail npm run dev
To create an admin user for the Filament dashboard, run the following command:
./vendor/bin/sail 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.