Skip to content

Instantly share code, notes, and snippets.

@jsdecena
Created March 21, 2018 14:05
Show Gist options
  • Save jsdecena/255207ff35a090aaebda9e29a168f714 to your computer and use it in GitHub Desktop.
Save jsdecena/255207ff35a090aaebda9e29a168f714 to your computer and use it in GitHub Desktop.
<?php
namespace App\Shop\Base\Interfaces;
interface BaseRepositoryInterface
{
public function create(array $attributes);
public function update(array $attributes, int $id);
public function all($columns = array('*'), string $orderBy = 'id', string $sortBy = 'desc');
public function find(int $id);
public function findOneOrFail(int $id);
public function findBy(array $data);
public function findOneBy(array $data);
public function findOneByOrFail(array $data);
public function paginateArrayResults(array $data, int $perPage = 50);
public function delete(int $id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment