PHPackages                             rifrocket/trait-console - 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. rifrocket/trait-console

ActiveLibrary

rifrocket/trait-console
=======================

Console command to create Traits for the Laravel

3.3(5y ago)07MITPHPPHP ^7.1

Since Oct 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rifRocket/trait-console)[ Packagist](https://packagist.org/packages/rifrocket/trait-console)[ Docs](https://github.com/rifrocket/trait-console)[ RSS](/packages/rifrocket-trait-console/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

about this package
==================

[](#about-this-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8e3fe8b9e6fa643dd899842ac93acd68268c394a5e53aa2d17ae446512ef00ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726966726f636b65742f74726169742d636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rifrocket/trait-console)[![Quality Score](https://camo.githubusercontent.com/f9f6e847457d5c932a732ee7feadf66bef3261feb70bc3498555685bebf4afc6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f726966726f636b65742f74726169742d636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rifrocket/trait-console)[![Total Downloads](https://camo.githubusercontent.com/232341da2af648e4be84874d8a14c8ae4090e06b15ff165aefc3ea409d08ec0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726966726f636b65742f74726169742d636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rifrocket/trait-console)

Laravel does not provide the command to create Traits out of the box but Laravel does provide commands generation for almost all kinds of components. This package introduces the convenience of Laravel's artisan makes for trait generation.

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

[](#installation)

You can install the package via composer:

```
composer require rifrocket/trait-console
```

### Registering the service provider

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

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

```
Rifrocket\TraitConsole\TraitConsoleServiceProvider::class,
```

Usage
-----

[](#usage)

trait will be created in the App/Traits directory.

```
php artisan make:trait NameOfYourTrait
```

You may create traits in subdirectories to organize them as per your need

```
php artisan make:trait Subdirectory/NameOfYourTrait
```

trait will be created in the App/Traits/Subdirectory directory and namespaced appropriately.

### Arguments

[](#arguments)

-b or --boot

```
php artisan make:trait NameOfYourTrait -b MethodName
```

Creates a trait with a boot method named bootMethodName.

-s or --scope

```
php artisan make:trait NameOfYourTrait -s MethodName
```

Creates a trait with a scope method named scopeMethodName.

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mohammad Arif](https://github.com/rifrocket)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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 ~0 days

Total

6

Last Release

2029d ago

Major Versions

1.0 → 2.02020-10-23

2.0 → 3.02020-10-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/0760d2ca4970ea58535ee77fa44041b71ed2b6e3ab898a3b930d7bccc1175d56?d=identicon)[mohammad\_arif](/maintainers/mohammad_arif)

---

Top Contributors

[![alkatechsoft](https://avatars.githubusercontent.com/u/72004413?v=4)](https://github.com/alkatechsoft "alkatechsoft (10 commits)")[![rifrocket](https://avatars.githubusercontent.com/u/66988599?v=4)](https://github.com/rifrocket "rifrocket (6 commits)")

---

Tags

rifrockettrait-console

### Embed Badge

![Health badge](/badges/rifrocket-trait-console/health.svg)

```
[![Health](https://phpackages.com/badges/rifrocket-trait-console/health.svg)](https://phpackages.com/packages/rifrocket-trait-console)
```

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

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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