PHPackages                             spatie/laravel-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. spatie/laravel-stubs

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

spatie/laravel-stubs
====================

Opinionated Laravel stubs

3.2.0(2mo ago)252616.9k—1.5%372MITPHPPHP ^8.2CI failing

Since Mar 24Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/spatie/laravel-stubs)[ Packagist](https://packagist.org/packages/spatie/laravel-stubs)[ Docs](https://github.com/spatie/laravel-stubs)[ Fund](https://spatie.be/open-source/support-us)[ RSS](/packages/spatie-laravel-stubs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (31)Used By (2)

Opinionated Laravel stubs
=========================

[](#opinionated-laravel-stubs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b1ba1ab1acdf0aa720b343d9bf1506e018cd253dc748ec6c1d4f4fd52142f7d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d73747562732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-stubs)[![run-tests](https://github.com/spatie/laravel-stubs/actions/workflows/run-tests.yml/badge.svg)](https://github.com/spatie/laravel-stubs/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/9710272d5bd087befec241778508fa7760e428917744da56ae2db5e234dd8ce1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d73747562732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-stubs)

This repo contains opinionated versions of the Laravel stubs. The most notable changes are:

- migrations don't have a `down` function
- controllers don't extend a base controller
- none of the model attributes are guarded
- use return type hints where possible
- most docblocks have been removed

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/cee1ad3ed7df596b97ebf6cd9445b6e1783f9405f858d829dac0f0082ed45246/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d73747562732e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-stubs)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Exploring laravel-stubs
-----------------------

[](#exploring-laravel-stubs)

In this [video on YouTube](https://www.youtube.com/watch?v=I-y-VSOL93I), Povilas Korop explores our package.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require spatie/laravel-stubs --dev
```

If you want to keep your stubs up to date with every update, add this composer hook to your composer.json file:

```
"scripts": {
    "post-update-cmd": [
        "@php artisan spatie-stub:publish --force"
    ]
}
```

Usage
-----

[](#usage)

You can publish the stubs using this command:

```
php artisan spatie-stub:publish
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance83

Actively maintained with recent releases

Popularity57

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 62.3% 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 ~77 days

Recently: every ~178 days

Total

29

Last Release

85d ago

Major Versions

0.0.1 → 1.0.02020-03-24

1.1.1 → 2.0.02020-09-14

v1.x-dev → 3.0.02024-03-08

PHP version history (4 changes)0.0.1PHP ^7.4

2.1.0PHP ^7.4|^8.0

2.4.0PHP ^8.0

3.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (94 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (9 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (7 commits)")[![mokhosh](https://avatars.githubusercontent.com/u/6499685?v=4)](https://github.com/mokhosh "mokhosh (5 commits)")[![alexmanase](https://avatars.githubusercontent.com/u/10696975?v=4)](https://github.com/alexmanase "alexmanase (4 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (4 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (4 commits)")[![chrisinit](https://avatars.githubusercontent.com/u/35133075?v=4)](https://github.com/chrisinit "chrisinit (4 commits)")[![SamuelMwangiW](https://avatars.githubusercontent.com/u/1807304?v=4)](https://github.com/SamuelMwangiW "SamuelMwangiW (4 commits)")[![Xammie](https://avatars.githubusercontent.com/u/13081809?v=4)](https://github.com/Xammie "Xammie (2 commits)")[![rubenvanassche](https://avatars.githubusercontent.com/u/619804?v=4)](https://github.com/rubenvanassche "rubenvanassche (1 commits)")[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (1 commits)")[![SamuelNitsche](https://avatars.githubusercontent.com/u/24483576?v=4)](https://github.com/SamuelNitsche "SamuelNitsche (1 commits)")[![Sparclex](https://avatars.githubusercontent.com/u/2805213?v=4)](https://github.com/Sparclex "Sparclex (1 commits)")[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (1 commits)")[![Carnicero90](https://avatars.githubusercontent.com/u/78483736?v=4)](https://github.com/Carnicero90 "Carnicero90 (1 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (1 commits)")[![erikn69](https://avatars.githubusercontent.com/u/4933954?v=4)](https://github.com/erikn69 "erikn69 (1 commits)")[![fridzema](https://avatars.githubusercontent.com/u/8180660?v=4)](https://github.com/fridzema "fridzema (1 commits)")[![jsandfordhughescoop](https://avatars.githubusercontent.com/u/170418572?v=4)](https://github.com/jsandfordhughescoop "jsandfordhughescoop (1 commits)")

---

Tags

developmentlaravelphpstubsspatielaravel-stubs

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/spatie-laravel-stubs/health.svg)

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

###  Alternatives

[spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

3.2k5.7M57](/packages/spatie-laravel-analytics)[spatie/color

A little library to handle color conversions

38118.9M28](/packages/spatie-color)[spatie/laravel-missing-page-redirector

Redirect missing pages in your Laravel application

5071.4M15](/packages/spatie-laravel-missing-page-redirector)

PHPackages © 2026

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