PHPackages                             timwassenburg/laravel-trait-generator - 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. [CLI &amp; Console](/categories/cli)
4. /
5. timwassenburg/laravel-trait-generator

ActiveLibrary[CLI &amp; Console](/categories/cli)

timwassenburg/laravel-trait-generator
=====================================

Generate Laravel Traits

v1.0.0(3y ago)24.7k↓41.7%1[4 PRs](https://github.com/timwassenburg/laravel-trait-generator/pulls)1MITPHPCI passing

Since Apr 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/timwassenburg/laravel-trait-generator)[ Packagist](https://packagist.org/packages/timwassenburg/laravel-trait-generator)[ Docs](https://github.com/timwassenburg/laravel-trait-generator)[ RSS](/packages/timwassenburg-laravel-trait-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (6)Used By (1)

[![Logo](img/banner.png)](img/banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/01788200aaaff647a77a52fcf61e9873682ca1d306d53cf2234fc4900410b214/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74696d77617373656e627572672f6c61726176656c2d74726169742d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/timwassenburg/laravel-trait-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/81bc65b3ef2767320f3534d86c878af7cebf3b3c33f70bdb00fc184d6473fb5e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f74696d77617373656e627572672f6c61726176656c2d74726169742d67656e657261746f722f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/timwassenburg/laravel-trait-generator/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/6f331cdc37a90e50df49a5f3fd710c1f9fbdada2a58f1f16c71b15ece4a30d89/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696d77617373656e627572672f6c61726176656c2d74726169742d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/timwassenburg/laravel-trait-generator)[![License](https://camo.githubusercontent.com/4bbddf1c66a65df877d0b89bf821fdb41ff7412182c1879cbb8364ecaffdbf68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74696d77617373656e627572672f6c61726176656c2d74726169742d67656e657261746f72)](https://packagist.org/packages/timwassenburg/laravel-trait-generator)

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Usage](#usage)
3. [Testing](#testing)
4. [More generator packages](#more-generator-packages)
5. [Contributing](#contributing)
6. [License](#license)

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

[](#installation)

Install the package with composer.

```
composer require timwassenburg/laravel-trait-generator --dev
```

Usage
-----

[](#usage)

Run the following command on the command-line to generate a new trait.

```
php artisan make:trait {name}

```

Optionally, you can add multiple method names (seperated by comma) with the `--methods` param.

```
php artisan make:trait Notifiable --methods=notify,notifications
```

Testing
-------

[](#testing)

Run the tests with:

```
composer test
```

More generator packages
-----------------------

[](#more-generator-packages)

Looking for more ways to speed up your workflow? Make sure to check out these packages.

- [Laravel Action Generator](https://github.com/timwassenburg/laravel-action-generator)
- [Laravel Pivot Table Generator](https://github.com/timwassenburg/laravel-pivot-table-generator)
- [Laravel Repository Generator](https://github.com/timwassenburg/laravel-repository-generator)
- [Laravel Service Generator](https://github.com/timwassenburg/laravel-service-generator)
- [Laravel Trait Generator](https://github.com/timwassenburg/laravel-trait-generator)

The packages mentioned above are part of [Laravel Artisan Extender](https://github.com/timwassenburg/laravel-artisan-extender).

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

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance52

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

1123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18ef476c8a9d76d44ab65724fb4be330c1c4ce90e2be793bc4628b85bd0d5ba5?d=identicon)[timwass](/maintainers/timwass)

---

Top Contributors

[![timwassenburg](https://avatars.githubusercontent.com/u/75377381?v=4)](https://github.com/timwassenburg "timwassenburg (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![pecepl](https://avatars.githubusercontent.com/u/157137805?v=4)](https://github.com/pecepl "pecepl (1 commits)")

---

Tags

phpclilaravelgeneratorartisantraitpattern

### Embed Badge

![Health badge](/badges/timwassenburg-laravel-trait-generator/health.svg)

```
[![Health](https://phpackages.com/badges/timwassenburg-laravel-trait-generator/health.svg)](https://phpackages.com/packages/timwassenburg-laravel-trait-generator)
```

###  Alternatives

[nunomaduro/collision

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

4.6k331.8M8.5k](/packages/nunomaduro-collision)[timwassenburg/laravel-service-generator

Generate Laravel services

104233.1k2](/packages/timwassenburg-laravel-service-generator)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[nunomaduro/laravel-console-summary

A Beautiful Laravel Console Summary for your Laravel/Laravel Zero commands.

662.0M3](/packages/nunomaduro-laravel-console-summary)[nunomaduro/laravel-console-dusk

Laravel Console Dusk allows the usage of Laravel Dusk in Laravel/Laravel Zero artisan commands.

16255.4k7](/packages/nunomaduro-laravel-console-dusk)

PHPackages © 2026

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