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

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

rawilk/laravel-stubs
====================

Opinionated modifications to the default Laravel stubs.

v2.0.0(1y ago)13.5k↓31.3%[3 PRs](https://github.com/rawilk/laravel-stubs/pulls)1MITPHPPHP ^8.2CI passing

Since Sep 30Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/rawilk/laravel-stubs)[ Packagist](https://packagist.org/packages/rawilk/laravel-stubs)[ Docs](https://github.com/rawilk/laravel-stubs)[ GitHub Sponsors](https://github.com/rawilk)[ RSS](/packages/rawilk-laravel-stubs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (16)Used By (1)

laravel-stubs
=============

[](#laravel-stubs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/32ad2d8674e8084de03bf66b63df27e846dbc4ab52181bcf958e58383f90a9a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726177696c6b2f6c61726176656c2d73747562732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rawilk/laravel-stubs)[![Tests](https://github.com/rawilk/laravel-stubs/workflows/Tests/badge.svg?style=flat-square)](https://github.com/rawilk/laravel-stubs/workflows/Tests/badge.svg?style=flat-square)[![Total Downloads](https://camo.githubusercontent.com/f4fa3a77b924a774312fdcd388d1d5426edb993b2422bcd4b7239389e97e4a38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726177696c6b2f6c61726176656c2d73747562732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rawilk/laravel-stubs)[![PHP from Packagist](https://camo.githubusercontent.com/11504d29df4577f371b2c275ffcd9793a8c7b9d9718d4ac1b96331443421526e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f726177696c6b2f6c61726176656c2d73747562733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rawilk/laravel-stubs)[![License](https://camo.githubusercontent.com/eb4682bdbb1c9bd2c65a45454deda3b90b4218a1c5524d26b27019e34ac06dc7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f726177696c6b2f6c61726176656c2d73747562733f7374796c653d666c61742d737175617265)](https://github.com/rawilk/laravel-stubs/blob/main/LICENSE.md)

[![Social image](https://camo.githubusercontent.com/9d11a6a0f9cd58aaaeed0a4ee76b9d8c7d9331de50d1cc870c715e4782a4eb68/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f6c61726176656c2d73747562732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d726177696c6b2532466c61726176656c2d73747562732b2d2d646576267061747465726e3d656e646c657373436c6f756473267374796c653d7374796c655f31266465736372697074696f6e3d4f70696e696f6e617465642b6d6f64696669636174696f6e732b746f2b7468652b64656661756c742b4c61726176656c2b73747562732e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d636f6c6c656374696f6e)](https://camo.githubusercontent.com/9d11a6a0f9cd58aaaeed0a4ee76b9d8c7d9331de50d1cc870c715e4782a4eb68/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f6c61726176656c2d73747562732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d726177696c6b2532466c61726176656c2d73747562732b2d2d646576267061747465726e3d656e646c657373436c6f756473267374796c653d7374796c655f31266465736372697074696f6e3d4f70696e696f6e617465642b6d6f64696669636174696f6e732b746f2b7468652b64656661756c742b4c61726176656c2b73747562732e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d636f6c6c656374696f6e)

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
- `declare(strict_types=1);` added to most files

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

[](#installation)

You can install the package via composer:

```
composer require rawilk/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 custom-stub:publish --force"
    ]
}
```

Usage
-----

[](#usage)

You can publish the stubs using this command:

```
php artisan custom-stub:publish
```

Usage in Packages
-----------------

[](#usage-in-packages)

If you're developing a package, you may pull these stubs in to your package and generate them just like you would with a normal Laravel project. This is possible when used with [Orchestral Canvas](https://github.com/orchestral/canvas). On your package project, run the following command:

```
composer require --dev rawilk/laravel-stubs orchestra/canvas
```

Next you need to run:

```
composer exec canvas preset package
```

Finally, modify the generated `canvas.yaml` file:

```
preset: Rawilk\Stubs\Canvas\Package
namespace: YourPackageNamespace
```

To generate a file, you can run the following command:

```
composer exec canvas make:migration CreatePostsTable --create
```

Running this would generate a migration normally, just like the `php artisan make:migration` command would. For more information on canvas, please refer to their documentation.

**Tip:** Create an alias for `composer exec canvas` in your profile to allow easier entering of your generator commands. I personally added the following alias to my bash profile:

```
alias canvas="composer exec canvas"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Randall Wilk](https://github.com/rawilk)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance64

Regular maintenance activity

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 72.6% 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 ~82 days

Recently: every ~173 days

Total

12

Last Release

420d ago

Major Versions

v1.3.0 → v2.0.02025-03-18

PHP version history (3 changes)v1.0.0PHP ^8.1

v1.1.5PHP ^8.1|^8.2

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e2f599d4d290bbb514a933d4f21c3f18fb093f5f8a9994cb17f5469853c749c?d=identicon)[rawilk](/maintainers/rawilk)

---

Top Contributors

[![rawilk](https://avatars.githubusercontent.com/u/22842525?v=4)](https://github.com/rawilk "rawilk (98 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (22 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")

---

Tags

laravellaravel-stubslaravelstubslaravel-stubs

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[bpocallaghan/generators

Custom Laravel File Generators with config and publishable stubs.

11965.8k3](/packages/bpocallaghan-generators)

PHPackages © 2026

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