A simple package to create a make:repository command for Laravel 5+ and Composer 2+
fraq/laravel-make-repository is a Laravel package for a simple package to create a make:repository command for laravel 5+ and composer 2+.
It currently has 0 GitHub stars and 131 downloads on Packagist (latest version 0.0.3).
Install it with composer require fraq/laravel-make-repository.
Discover more Laravel packages by fraq
or browse all Laravel packages to compare alternatives.
Last updated
A simple package for addding php artisan make:repository command to Laravel 5 and above
Require the package with composer using the following command:
composer require jason-guru/laravel-make-repository --dev
Or add the following to your composer.json's require-dev section and composer update
"require-dev": {
"jason-guru/laravel-make-repository": "^0.0.2"
}
php artisan make:repository your-repository-name
Example:
php artisan make:repository UserRepository
or
php artisan make:repository Backend\UserRepository
The above will create a repositories directory inside the app directory.
Once the repository is generated add your model class and return it in the model function,
Example:
<?php
namespace DummyNamespace;
use JasonGuru\LaravelMakeRepository\Repository\BaseRepository;
//use Your Model
/**
* Class DummyClass.
*/
class DummyClass extends BaseRepository
{
/**
* @return string
* Return the model
*/
public function model()
{
//return YourModel::class
}
}