PHPackages                             mantey/laratrait - 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. mantey/laratrait

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

mantey/laratrait
================

An easy way to create a trait with php artisan command

v1.2.0(6y ago)430MITPHPPHP &gt;=5.6.0

Since Feb 1Pushed 6y ago2 watchersCompare

[ Source](https://github.com/mantey-github/laratrait)[ Packagist](https://packagist.org/packages/mantey/laratrait)[ Docs](https://github.com/mantey-github/laratrait)[ RSS](/packages/mantey-laratrait/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Laratrait
=========

[](#laratrait)

[![Latest Version on Packagist](https://camo.githubusercontent.com/642f243c1327c2e021d660ff0e0b36b71846ae33780a74e354e1a577cad0585f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616e7465792f6c61726174726169742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mantey/laratrait)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/f688cfaa2adb9207a751d9b8ef1930e7289a2bbcba01a8a837da9d8021b8e8b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616e7465792f6c61726174726169742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mantey/laratrait)

Laratrait is an easy way to add traits (trait folder and trait stub) to your laravel projects, using the artisan command `php artisan laratrait:trait TraitName`

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

[](#installation)

To install via Composer run the command from your terminal:

```
$ composer require mantey/laratrait
```

Usage
-----

[](#usage)

The command below should show `make:trait` as one of the artisan commands after installation.

```
$ php artisan
```

To make a trait just run the command below. `TraitName`, being the name of your trait.

```
$ php artisan make:trait TraitName
```

To specify the path for the trait use the option `--path` and the`--func` option adds a function to your trait.

```
$ php artisan make:trait TraitName --path=pathName --func=functionName
```

To generate traits with multiple functions.

```
$ php artisan make:trait TraitName --func=foo,bar,foobar
```

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

[](#contributing)

Please report any issue you find in the issues page. Pull requests are always welcome.

License
-------

[](#license)

Laratrait is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~35 days

Recently: every ~53 days

Total

7

Last Release

2442d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3439046?v=4)[Rodrigo Mantey](/maintainers/mantey)[@mantey](https://github.com/mantey)

---

Top Contributors

[![mantey-github](https://avatars.githubusercontent.com/u/39991756?v=4)](https://github.com/mantey-github "mantey-github (19 commits)")

---

Tags

laravelartisantraitcommandlaravel traitslaratrait

### Embed Badge

![Health badge](/badges/mantey-laratrait/health.svg)

```
[![Health](https://phpackages.com/badges/mantey-laratrait/health.svg)](https://phpackages.com/packages/mantey-laratrait)
```

###  Alternatives

[msztorc/laravel-env

Laravel env helper commands

7855.4k](/packages/msztorc-laravel-env)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)

PHPackages © 2026

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