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)1420.6k↓19.5%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 today

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 87% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

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

1226d 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

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M201](/packages/laravel-ai)[livewire/flux

The official UI component library for Livewire.

9527.8M128](/packages/livewire-flux)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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