codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 12.x projects. It includes FilamentPHP 4.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

Fund package maintenance!
CodeWithDennis

Installs: 719

Dependents: 0

Suggesters: 0

Security: 0

Stars: 270

Watchers: 4

Forks: 20

Open Issues: 0

Language:Blade

Type:project


README

Pint PEST PHPStan Total Installs Latest Version on Packagist

Larament is a bloat-free starter kit for quickly launching Laravel 12.x projects. It comes with FilamentPHP 4.x pre-installed and configured, plus essential tools to speed up your development—nothing more, nothing unnecessary.

Caution

Filament 4 is currently in beta — use it cautiously in production.

Note

Larament requires PHP 8.3 or higher to run.

Dependencies

This project includes several core dependencies that provide essential functionality:

  • nunomaduro/essentials: Essentials provide better defaults for your Laravel applications including strict models, automatically eagerly loaded relationships, immutable dates, and more!

Development

This project includes several development dependencies to ensure code quality and streamline the development process:

These tools help maintain code quality, provide testing capabilities, and improve the development experience. Larament comes with a bunch of tests to ensure everything works as expected.

Tests

Configurations

Larament comes with several pre-configured settings to enhance your development experience:

Filament Admin Panel

  • SPA Mode enabled by default for a smoother, more responsive admin experience
  • Color::Blue color as the primary color
  • Custom login page with autofilled credentials in local environment for easier development
  • Includes a pre-configured custom theme, allowing for easy styling customization and consistent design across your admin panel
  • Profile enabled by default, allowing users to manage their profiles directly from the admin panel
  • (MFA) is enabled by default (App Authentication), providing an extra layer of security for your admin panel

Login

Filament Table Configuration

All Filament tables are pre-configured with:

  • Striped Rows: For better visual separation between rows
  • Deferred Loading: Improves performance by loading table data after the initial page load

Users Table

Laravel Migration Stubs

Larament includes custom migration stubs that removes the down() method by default. The removal of the down() method is a debated topic in the Laravel community - while some developers prefer to keep it for rollback capabilities, others find it rarely used in practice. If you prefer to keep the down() method, you can simply remove these custom stubs and Laravel will use its default migration templates.

<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
{
    public function up(): void
    {
        //
    }
};

Helper Functions

Larament comes with a pre-configured app/Helpers.php file where you can define your own helper functions. The file is already set up in your composer.json for autoloading. Here's an example of how to add your own helper functions:

if (! function_exists('example')) {
    function example(): string
    {
        return 'This is an example function you can use in your project.';
    }
}

Development Commands

Larament includes a convenient composer command to streamline your development workflow:

composer review

This command runs all code quality tools in sequence:

  • Laravel Pint for code style fixing
  • Rector for automated code refactoring
  • PHPStan for static analysis
  • Pest for testing

Installation

Create a new Larament project and set it up with a single command:

composer create-project codewithdennis/larament your-project-name
cd your-project-name 
composer install
npm install
npm run build
php artisan serve

Create a terminal alias

For easier usage in future projects, create an alias in your terminal:

alias larament="composer create-project --prefer-dist CodeWithDennis/larament"

Now, you can create a new project with a simple command:

larament basecamp