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.0(4mo ago)0244↑16.7%MITPHPPHP ^8.2

Since Dec 20Pushed 4mo 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 1mo ago

READMEChangelogDependencies (1)Versions (2)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

35

—

LowBetter than 80% of packages

Maintenance73

Regular maintenance activity

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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

Unknown

Total

1

Last Release

149d 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 (1 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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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