arispati/lapice

Laravel library to use repository and service pattern
2,188 1
Install
composer require arispati/lapice
Latest Version:v0.1.0
PHP:>=7.1
License:MIT
Last Updated:Jan 24, 2022
Links: GitHub  ·  Packagist
Maintainer: arispati

Lapice

Laravel library to use repository and service pattern

Table of Contents

Requirement

  • PHP >= 7.1
  • Laravel >= 5.6

Installation

  • Install with composer
composer require arispati/lapice

Available Commands

Create Repository

php artisan lapice:repository ExampleRepository

It will generate app/Repositories/ExampleRepository.php file

<?php

namespace App\Repositories;

use Arispati\Lapice\Repository\BaseRepository;

class ExampleRepository extends BaseRepository
{
    /**
     * Set the model class
     *
     * @return string
     */
    protected function setModel(): string
    {
        // return Model::class;
    }
}

Create Service

php artisan lapice:service ExampleService

It will generate app/Services/ExampleService.php file

<?php

namespace App\Services;

class ExampleService
{
    /**
     * Class constructor
     */
    public function __construct()
    {
        //
    }
}

Wiki

Related Packages

janez89/repository

Repository Pattern for Eloquent

6,276 8
longman/laravel-platfourm

Package to implement right Repository/Service architecture in Laravel 5.x

642 8
larachimp/mango-repo

Simple repository package for Laravel 5.

7,162 30
motty/laravel-repository

Laravel - Repository Design Pattern Implementation

50 2