Download the PHP package idtitanium/laravel-api-interface-gen without Composer
On this page you can find all versions of the php package idtitanium/laravel-api-interface-gen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download idtitanium/laravel-api-interface-gen
More information about idtitanium/laravel-api-interface-gen
Files in idtitanium/laravel-api-interface-gen
Package laravel-api-interface-gen
Short Description A useful artisan command to generate an interface and its repository while building your api
License MIT
Informations about the package laravel-api-interface-gen
laravel-api-interface-gen
Provides useful artisan command to help generate repositories and interfaces.
USAGE
-
Installing To install run
composer require idtitanium/laravel-api-interface-gen
. Support Laravel version 6.1 or higher. Lower versions might not work so nicely. -
Making an Interface When you run
php artisan make:interface Book
. This will generate two folders (if they don't already exist). One called Repositories and inside it Interfaces. Then, theBookRepostoryInterface
will be created inside the Interfaces folder. -
Making a Repository when you run
php artisan make:repository Book
. This will generate a repository class with the NameBookRepository
With an assumption that you already have an interface calledBookRepositoryInterface
. -
Making a Repsoitory and Interface. This is the best part of this package. when you run
php artisan make:repositoryinterface Book
. This creates both the repository and the interface in their respective folders and correct namespaces. - All command will create a
RepositoryServiceProvider
file, if it doesn't currently exist.