Git Product home page Git Product logo

repository-package's Introduction

Repository Package

hero

Introduction

This package main purpose is to manage repository design pattern in your laravel projects. It helps you create your repository and interface files respectively with a single command.

Installation

To install this package run:

composer require eazybright/repository-package

This will install the package into your project.

Usage

Next, create a repostory file by running:

php artisan repository:create Blog

Make sure to provide your own argument name when running the above command, I used Blog as an example.

Once the command run, it creates the repository files App\Repositories\BlogRepository.php, App\Repositories\Interfaces\BlogRepositoryInterface.php and also create a service provider file in App\Providers\RepositoryServiceProvider.php.

You need to register the service provider. Open up config/app.php and add the following to the providers key.

'providers' => [
    ...
    App\Providers\RepositoryServiceProvider::class,
    ...
]

The Repository file will be registered into RepositoryServiceProvider::class whenever it is created.

<?php
...
    use App\Repositories\Interfaces\BlogRepositoryInterface;
    use App\Repositories\BlogRepository;

    ...

    public function register()
    {
        $this->app->bind(
            BlogRepositoryInterface::class,
            BlogRepository::class
        )
    }
...

Contributing

Please feel free to star and fork this package. You can also contribute by submitting a pull request to enhance the functionalities.

License

The MIT License (MIT). Please see License File for more information.

repository-package's People

Contributors

eazybright avatar ezekiel-cudium avatar

Stargazers

 avatar Gabriel Akinyosoye avatar Odejinmi Tobiloba avatar Chukwuezugo avatar William Nwogbo avatar Abdurrazaq Olusola Ogunlade avatar

Watchers

James Cloos avatar  avatar Odejinmi Tobiloba avatar oluwaseun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.