2017 © Pedro Peláez
 

library repoist

Laravel 5 repository generator.

image

laravel_tools_dev/repoist

Laravel 5 repository generator.

  • Monday, September 19, 2016
  • by shaobaojie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,218 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 25 Forks
  • 0 Open issues
  • 9 Versions
  • 24 % Grown

The README.md

Repoist

Laravel 5 repository generator., (*1)

Usage

Step 1: Install Through Composer

composer require laravel_tools_dev/repoist --dev

Step 2: Add the Service Provider

You'll only want to use these generators for local development, so you don't want to update the production providers array in config/app.php. Instead, add the provider in app/Providers/AppServiceProvider.php, like so:, (*2)

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register('Kurt\Repoist\RepoistServiceProvider');
    }
}

Step 3: Publish and edit the configurations

Run php artisan vendor:publish from the console to configure the Repoist according to your needs., (*3)

Step 4: Run Artisan!

You're all set. Run php artisan from the console, and you'll see the new commands in the make:repository namespace section., (*4)

Examples

Repositories Without Schema

php artisan make:repository Task

Will output:, (*5)

  • app/Interfaces/Task/TaskRepositoryInterface.php (contract)
  • app/Repositories/Task/TaskRepositoryEloquent.php

Repositories With Schema

php artisan make:repository Task -m

Will output:, (*6)

  • app/Interfaces/Task/TaskRepositoryInterface.php (contract)
  • app/Repositories/Task/TaskRepositoryEloquent.php
  • app/Models/TaskEloquent.php

Configurations

If somehow you cannot publish the config/repoist.php from artisan here you can copy and use it., (*7)

<?php

return [

    /**
     * Default paths.
     * In this case:
     *      app/Interfaces
     *      app/Repositories
     *      app/Models
     */
    'paths' => [
            'contract' => 'app/Interfaces',
            'eloquent' => 'app/Repositories',
            'model' => 'app/Models',
    ],
    /**
     * Configure the naming convention you wish for your repositories.
     *
     * Example: php artisan make:repository Users
     *      - Contract: UsersRepository
     *      - Eloquent: EloquentUsersRepository
     *      - Model   : UsersEloquent
     */
    'fileNames' => [

        'contract' => '{name}RepositoryInterface',
        'eloquent' => '{name}RepositoryEloquent',
        'model' => '{name}Eloquent',

    ],

];

The Versions

19/09 2016

dev-test

dev-test

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel repoist

19/09 2016

1.0.5

1.0.5.0

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel repoist

19/09 2016

1.0.4

1.0.4.0

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel repoist

19/09 2016

dev-master

9999999-dev

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by baojie.shao

laravel repoist

19/09 2016

1.0.3

1.0.3.0

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by baojie.shao

laravel repoist

19/09 2016

1.0.2

1.0.2.0

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by baojie.shao

laravel repoist

13/01 2016

1.1.x-dev

1.1.9999999.9999999-dev

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel repoist

15/05 2015

1.0.1.x-dev

1.0.1.9999999-dev

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel repoist

15/05 2015

1.0.1

1.0.1.0

Laravel 5 repository generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel repoist