There is no license information available for the latest version (v1.0.7) of this package.

Service, Repository, Transformer simple generator.

v1.0.7 2021-08-18 06:55 UTC


SRT = Service + Repository + Transformer

Generator tool


$ composer require maras0830/laravel-srt


Make Service

$ php artisan make:service UserService

Make Repository

$ php artisan make:repository UserRepository

Make Transformer

$ php artisan make:transformer UserTransformer

Make Service+Repository+Transformer

$ php artisan make:srt User

Eager query check & Strict Mode

in your CustomerTransformer file

public function __construct()
	// set your eager query required relations.

    // false: laravel-srt log warning when you forgot eager query( ->with(['notificationable']) )
    // true: laravel-srt throw TransformerException when you forgot eager query( ->with(['notificationable']) )