New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

florianpalabost/lara-stubs

Opinionated Laravel stubs with strict types, final classes, and modern PHP conventions
1,074

Larablocks Analysis

florianpalabost/lara-stubs works with Laravel 11, 12 and 13 (latest release v0.1.1, Jun 12, 2026).

Promising: maintained and up to date, meets 2 of 4 checks; not yet widely used.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Jun 12, 2026)
  • 293 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Jun 12, 2026.
  • 2 releases in the last 12 months.
  • First released: Dec 20, 2025.
  • Monthly downloads: 293.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.

Install
composer require florianpalabost/lara-stubs
Latest Version:v0.1.1
PHP:^8.2
Laravel:11 · 12 · 13
License:MIT
Last Updated:Jun 12, 2026
Links: GitHub  ·  Packagist
Maintainer: fpalabost

Lara Stubs

Opinionated Laravel stubs with strict types, final classes, and modern PHP conventions.

Features

  • Strict Types: All PHP files include declare(strict_types=1)
  • Final Classes: Uses final keyword for better immutability and intentional inheritance
  • Modern Conventions: Follows current PHP and Laravel best practices
  • Custom Stubs: Includes Action and Data stubs for common patterns
  • Pest Integration: Test stubs use it() syntax

Installation

Install via Composer:

composer require florianpalabost/lara-stubs --dev

Publish the stubs to your project:

php artisan vendor:publish --tag=lara-stubs

This will copy all stubs to your project's stubs/ directory, where Laravel will automatically use them.

Available Stubs

Custom Stubs

  • action.stub - Action pattern class with strict types and final modifier
  • data.stub - Spatie Laravel Data class

Enhanced Laravel Stubs

All standard Laravel stubs with improvements:

  • Controllers (API, invokable, nested, singleton variants)
  • Models, migrations, factories, seeders
  • Jobs, listeners, events
  • Policies, observers
  • Requests, resources, rules
  • Tests (Pest with it() syntax)
  • And more...

Usage

After publishing, all php artisan make:* commands will use these stubs:

# Creates an Action with strict types and final modifier
php artisan make:class CreateUserAction

# Creates a Data class extending Spatie\LaravelData\Data
php artisan make:class UserData

# Creates a controller with enhanced stub
php artisan make:controller UserController

# Creates a Pest test using it() syntax
php artisan make:test UserTest

Customization

After publishing, you can customize the stubs in your stubs/ directory. Your changes will be used instead of Laravel's defaults.

Requirements

  • PHP 8.2 or higher
  • Laravel 11.x or 12.x

License

MIT

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP Laravel License
v0.1.1 ^8.2 ^11.0|^12.0|^13.0 MIT
v0.1.0 ^8.2 ^11.0|^12.0 MIT