Skip to content

Commit

Permalink
add firstOrCreate method in RepositoryInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
joaosalless committed Mar 15, 2017
1 parent fb30fee commit ca84a3e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Prettus/Repository/Contracts/RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,13 @@ public function skipPresenter($status = true);
* @return mixed
*/
public function firstOrNew(array $attributes = []);

/**
* Retrieve first data of repository, or create new Entity
*
* @param array $attributes
*
* @return mixed
*/
public function firstOrCreate(array $attributes = []);
}

0 comments on commit ca84a3e

Please sign in to comment.