PHPackages                             ozankurt/repoist - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ozankurt/repoist

ActiveLibrary[Database &amp; ORM](/categories/database)

ozankurt/repoist
================

Laravel ^5.6 repository generator.

3.2.0(6y ago)9244.9k↓55.1%28[5 issues](https://github.com/OzanKurt/Repoist/issues)[2 PRs](https://github.com/OzanKurt/Repoist/pulls)MITPHPCI passing

Since May 15Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/OzanKurt/Repoist)[ Packagist](https://packagist.org/packages/ozankurt/repoist)[ RSS](/packages/ozankurt-repoist/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (1)Versions (10)Used By (0)

Repoist
=======

[](#repoist)

Laravel repository generator for 5.2+ versions

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require ozankurt/repoist

```

### Step 2: Publish and edit the configurations

[](#step-2-publish-and-edit-the-configurations)

**In Laravel:** Run `php artisan vendor:publish --tag=repoist-config` from the console to configure the Repoist according to your needs.

### Step 3: Run Artisan!

[](#step-3-run-artisan)

You're all set. Run `php artisan` from the console, and you'll see the new commands.

### For Lumen

[](#for-lumen)

In `bootstrap\app.php` enable Facades and Eloquent, also enable the configuration file.

```
$app->withFacades();
$app->withEloquent();

$app->configure('repoist');

```

In the Register service providers section add:

```
$app->register(Kurt\Repoist\RepoistServiceProvider::class);

```

Examples
--------

[](#examples)

- [Repository](#repository)
- [Criterion](#criterion)

### Repository

[](#repository)

```
php artisan make:repository Task

```

Will output:

- `app/Contracts/Task/TaskRepository.php` (contract)
- `app/Repositories/Eloquent/EloquentTaskRepository.php`
- `app/Task.php` (if needed)

### Criterion

[](#criterion)

```
php artisan make:criterion Completed

```

Will output:

- `app/Repositories/Eloquent/Criteria/Completed.php`

Configurations
--------------

[](#configurations)

If somehow you cannot publish the `config/repoist.php` from artisan here you can copy and use it.

```
