mzshovon/auto-repo

Single command repo generation for Laravel

Maintainers

Details

github.com/mzshovon/repo

Source

Issues

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mzshovon/auto-repo

1.0.7 2025-01-19 16:23 UTC

This package is auto-updated.

Last update: 2025-10-02 14:57:44 UTC


README

Laravel single command repository pattern generator with automatic binding.

Installation

You can install the package using composer:

composer require mzshovon/auto-repo

Register providers to your app config file.

Mzshovon\AutoRepo\RepositoryServiceProvider::class,
Mzshovon\AutoRepo\BindServiceProvider::class,

Great! Now your setup is done and you are ready to generate repository lifecycle in laravel via single command.

# For only generate interface with specific functions
php artisan generate:repo Test

Then it will ask for:

Do you want to bind model?
> yes # It will generate the model repo

If it is "no" Then it will ask for:

Do you want to bind service?
> yes # It will generate the service repo

Please make sure to cache the config after register providers.

php artisan config:cache

No need to bind! Just use your contract to access repository instances from anywhere.

License

MIT