Created
November 18, 2019 03:29
-
-
Save einnar82/6659ba80d4839d4701173b02431453d4 to your computer and use it in GitHub Desktop.
Base Repository interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Contracts; | |
interface BaseRepositoryContract | |
{ | |
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