Last active
June 25, 2016 23:06
-
-
Save Omranic/5dde1edcf5a02095512cf29996467534 to your computer and use it in GitHub Desktop.
Active Repository
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 | |
interface RepositoryContract | |
{ | |
public function find($id, $columns = ['*'], $with = []); | |
public function findBy($attribute, $value, $columns = ['*'], $with = []); | |
public function findAll($columns = ['*'], $with = []); | |
public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null); | |
public function findWhere(array $where, $columns = ['*'], $with = []); | |
public function findWhereIn($attribute, array $values, $columns = ['*'], $with = []); | |
public function findWhereNotIn($attribute, array $values, $columns = ['*'], $with = []); | |
public function firstOrCreate(array $attributes); | |
public function update($id, array $attributes = []); | |
public function delete($id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment