arispati / lapice
Laravel library to use repository and service pattern
Installs: 2 066
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- illuminate/console: >=5.6
- illuminate/database: >=5.6
- illuminate/filesystem: >=5.6
- illuminate/support: >=5.6
README
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() { // } }