PHPackages                             florianpalabost/lara-stubs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. florianpalabost/lara-stubs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

florianpalabost/lara-stubs
==========================

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

v0.1.1(3w ago)0477—2.6%MITPHPPHP ^8.2

Since Dec 20Pushed 3w agoCompare

[ Source](https://github.com/florianPalabost/lara-stubs)[ Packagist](https://packagist.org/packages/florianpalabost/lara-stubs)[ RSS](/packages/florianpalabost-lara-stubs/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Lara Stubs
==========

[](#lara-stubs)

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

Features
--------

[](#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
------------

[](#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
---------------

[](#available-stubs)

### Custom Stubs

[](#custom-stubs)

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

### Enhanced Laravel Stubs

[](#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
-----

[](#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
-------------

[](#customization)

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

Requirements
------------

[](#requirements)

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

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~173 days

Total

2

Last Release

22d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f09d6d72531e161f14dade1f86c06aeb0afe9950d34023a831953a2baceafc86?d=identicon)[fpalabost](/maintainers/fpalabost)

---

Top Contributors

[![florianPalabost](https://avatars.githubusercontent.com/u/25490174?v=4)](https://github.com/florianPalabost "florianPalabost (2 commits)")

### Embed Badge

![Health badge](/badges/florianpalabost-lara-stubs/health.svg)

```
[![Health](https://phpackages.com/badges/florianpalabost-lara-stubs/health.svg)](https://phpackages.com/packages/florianpalabost-lara-stubs)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
