• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 3 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

With repository and service you can separate business logic and query logic, slim controller and DRY. Simple generate repository and service with artisan command, automatically bind interface to class implement with IOC container and dependecy injection (SOLID)

Simple repository pattern for laravel, with services!

With easy repository, you can have the power of the repository pattern, without having to write too much code altogether. The package automatically binds the interfaces to the implementations, all you have to do is change in the configuration which implementation is being used at the moment!

Requirement

  • Minimum PHP ^8.1

Installation

You can install the package via composer for latest version

$ composer require yaza/laravel-repository-service

Specific Version :

Laravel Version Package Version
10 4.x
9 3.2
$ composer require yaza/laravel-repository-service:"^3.2"

Publish the config file with (Important):

php artisan vendor:publish --provider="LaravelEasyRepository\LaravelEasyRepositoryServiceProvider" --tag="easy-repository-config"

Quick usage

You can also create only the repository, or service, or both with artisan:

php artisan make:repository User
// or
php artisan make:repository UserRepository

// or create together with a service
php artisan make:repository User --service
// or
php artisan make:repository UserRepository --service

// or create a service separately
php artisan make:service User
// or
php artisan make:service UserService
// or
php artisan make:service UserService --repository

// create service for api template
php artisan make:service UserService --api

How to change bind interface to new class implementation

Add this config to AppServiceProvider :

$this->app->extend(Interface::class, function ($service, $app) {
    return new NewImplement($service);
});

Documentation

Go to guide Click Here

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

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

More Repositories

1

laravel-google-drive-storage

Laravel Google Drive Storage, You can store file like S3 AWS in laravel , this package allow to store file to google drive
PHP
109
star
2

chat-template-tutorial

PHP
28
star
3

lenovo-thinkpad-l430

EFI file for laptop lenovo thinkpad L430 core i3 3120M, bootloader opencore 0.6.3, MacOs Catalina 10.15.7
ASL
12
star
4

helpers

Helper javascript to handel standard CRUD process, include template ajax GET, POST, DELETE , notification pop up and handel validation form
JavaScript
9
star
5

golang-starter-api

Golang Starter API with standard Go project layout, central logger, include migration generator, seeder generator, jwt, echo, gorm
Go
6
star
6

realtime-chat-laravel-webscoket

Laravel Chat Realtime with laravel websockets
PHP
4
star
7

wilayah-administrasi-indonesia-2022

Data Wilayah Administrasi Indonesia 2022
3
star
8

laravel-job-batch

PHP
3
star
9

demo-laravel-websocket

PHP
3
star
10

artisan-blade

make blade with artisan, just call php artisan make:blade you can create file blade, create template syntax html or blade with stub file and auto insert to your blade
PHP
3
star
11

efi-lenovo-l430-monterey

EFI Lenovo Thinkpad L430 Monterey with Opencore 0.7.9
ASL
2
star
12

install-docker

Esay install docker on linux and deploy apps in docker, this config now for for php project
Dockerfile
2
star
13

EFI-Mojave

EFI mojave for komputer HP core i3 2100 chipset family 6 NVIDIA GT 710
Rich Text Format
1
star
14

auto-versioning-git

HTML
1
star
15

high-sierra-efi

Efi backup Kom PC HP 6200 core i3 2100 & cara install high sierra
Rich Text Format
1
star
16

yazQuery

Mini DOM manipulations like jquery, simple DOM manipulation to help you to handel basic DOM manipulations.
JavaScript
1
star
17

high-sierra-install

Tutorial install high sierra @copyright by ipang-dwi
1
star
18

Deployment-Server-Nginx-PHPFM

1
star
19

whatsapp-api-hit

Whatsapp API Hit support send message, send media file and send media url.
HTML
1
star
20

lenovo-l430-bigsur

This EFI LENOVO Thinkpad L430 Bigsur with opencore 0.6.3
ASL
1
star
21

miniDom

Mini DOM manipulations like jquery, simple DOM manipulation to help you to handel basic DOM manipulations.
JavaScript
1
star
22

laravel-helper

Shell
1
star
23

gos

Golang Starter API Tool
Go
1
star