rukhsar/traitcommand

A laravel artisan command to generate trait quickly.
507
Install
composer require rukhsar/traitcommand
Latest Version:v1.1
PHP:>=5.4.0
License:MIT
Last Updated:Dec 10, 2016
Links: GitHub  ·  Packagist
Maintainer: Rukhsar

Laravel Trait Command

A laravel artisan command to generate trait quickly.

Install

Via Composer

composer require rukhsar/traitcommand

In your config/app.php file, add the following to the providers array:

Rukhsar\TraitCommand\TraitCommandServiceProvider::class,

Usage

Once installed, you should see make:trait as one of the artisan commands when you run:

php artisan list

To use this command, supply it with two arguments, the first is the name of the trait, and the second is the name of the folder you want it to reside in. If the folder does not exist, it will be created for you. If you leave second argument empty, trait will be created under app/

For example:

php artisan make:trait ModelTrait Traits

This would create a directory named Traits in your app directory with a php file named ModelTrait.php.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

634,760,849 9,707
laravel/framework

The Laravel Framework.

584,532,650 34,931
laravel/tinker

Powerful REPL for the Laravel framework.

493,838,477 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

408,553,772 609
nunomaduro/collision

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

387,976,821 4,658