Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from io-digital/feature/update-repo-functions
Browse files Browse the repository at this point in the history
updated repo edit function
  • Loading branch information
garethnic authored Sep 6, 2016
2 parents 3fad7ac + f4187a1 commit 461cd40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/Models/Concrete/_AbstractEloquentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function make(array $with = [], array $orderBy = [])

public function find($id, $relations = [])
{
return $this->make($relations)
->where('id', $id)
->first();
return $this->make($relations)->find($id);
}

/**
Expand Down Expand Up @@ -121,7 +119,7 @@ public function edit($id, $attributes = array())
return false;
}

$obj->edit($attributes);
$obj->fill($attributes)->push();

return $obj;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Contracts/_RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function findWhereIn($field, array $values, $columns = ['*']);

public function paginate($perPage = 25, $columns = ['*']);

public function simplePaginate($limit = null, $columns = ['*']);
public function simplePaginate($limit = null, $columns = ['*']);

public function create($attributes = []);

Expand Down

0 comments on commit 461cd40

Please sign in to comment.