mateusjatenee/laravel-artisan-extended

dev-master 2016-09-16 16:21 UTC

This package is auto-updated.

Last update: 2024-10-25 07:14:14 UTC


README

Life is too short to only use default Artisan commands. Give some new ones a try!

Installation via Composer

$ composer require mateusjatenee/laravel-artisan-extended

Use

First of all, add Mateusjatenee\LaravelArtisanExtended\ArtisanExtendedServiceProvider::class to your array of service providers in config/app.php.

// Laravel 5: config/app.php
'providers' => [
    ...
    Mateusjatenee\LaravelArtisanExtended\ArtisanExtendedServiceProvider::class,

];

make:transformer

This command is particularly useful for people who build APIs. Instead of having to write a Transformer everytime, just run make:transformer {name of the transformer} {Model}

For instance, make:transformer Book App\Book will give you the following code:

<?php

namespace App\Transformers;

use League\Fractal\TransformerAbstract;

class BookTransformer extends TransformerAbstract
{
    public function transform(App\Book $book)
    {
        return [

        ];
    }
}

in the app/Transformers/BookTransformer.php file.

License

This library is licensed under the MIT license. Please see LICENSE for more details.

Changelog

Please see CHANGELOG for more details.

Contributing

Please see CONTRIBUTING for more details.