PHPackages                             mtownsend/laravel-make-trait - 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. mtownsend/laravel-make-trait

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

mtownsend/laravel-make-trait
============================

Rapid trait generation in Laravel.

1.5.0(3y ago)1419.8k↓42.3%5MITPHPPHP ~7.0|^8.0CI failing

Since Nov 28Pushed 1y ago2 watchersCompare

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

READMEChangelog (7)Dependencies (3)Versions (9)Used By (0)

This Repository is no longer maintained. Laravel 9 introduced a `make:trait` command, thus package this is no longer necessary.
===============================================================================================================================

[](#this-repository-is-no-longer-maintained-laravel-9-introduced-a-maketrait-command-thus-package-this-is-no-longer-necessary)

Rapid trait generation in Laravel.

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

[](#installation)

Install via composer:

```
composer require mtownsend/laravel-make-trait

```

### Registering the service provider

[](#registering-the-service-provider)

For Laravel 5.4 and lower, add the following line to your `config/app.php`:

```
/*
 * Package Service Providers...
 */
Mtownsend\MakeTrait\Providers\MakeTraitServiceProvider::class,
```

For Laravel 5.5 and greater, the package will auto register the provider for you.

### Using Lumen

[](#using-lumen)

To register the service provider, add the following line to `app/bootstrap/app.php`:

```
$app->register(Mtownsend\MakeTrait\Providers\MakeTraitServiceProvider::class);
```

Quick start
-----------

[](#quick-start)

### Generating a trait

[](#generating-a-trait)

```
php artisan make:trait YourTraitName

```

Your trait will be created in the `App/Traits` directory.

### Subdirectories

[](#subdirectories)

If you wish to further organize your traits by subdirectories, you can do so in the same way you would any other `artisan make` command.

```
php artisan make:trait Orders\\StatusCompleted --scope

```

Your StatusCompleted trait will be created in the `App/Traits/Orders` directory and namespaced appropriately.

Arguments
---------

[](#arguments)

**-b** or **--boot**

```
php artisan make:trait YourTraitName --boot

```

Creates a trait with a boot method.

**-s** or **--scope**

```
php artisan make:trait YourTraitName --scope

```

Creates a trait with a scope method.

Purpose
-------

[](#purpose)

Laravel provides wonderful time saving generation commands for almost all of the components developers need to build a successful web application. This package introduces the convenience of Laravel's `artisan make` for trait generation.

Credits
-------

[](#credits)

- Mark Townsend
- [All Contributors](../../contributors)

Testing
-------

[](#testing)

Due to the simple nature of this package, testing has been purposefully omitted.

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 92.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 ~221 days

Recently: every ~271 days

Total

8

Last Release

1179d ago

PHP version history (2 changes)1.0.0PHP ~7.0

1.3.1PHP ~7.0|^8.0

### Community

Maintainers

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

---

Top Contributors

[![mtownsend5512](https://avatars.githubusercontent.com/u/4945553?v=4)](https://github.com/mtownsend5512 "mtownsend5512 (12 commits)")[![jeremykenedy](https://avatars.githubusercontent.com/u/6244570?v=4)](https://github.com/jeremykenedy "jeremykenedy (1 commits)")

---

Tags

artisanartisan-commandbootlaravelmakescopetraitlaravelartisantraitmake

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mtownsend-laravel-make-trait/health.svg)

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

###  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)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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