Commit 27b93cbc authored by 王源's avatar 王源 🎧

添加list方法

parent 6dc6b0b2
...@@ -11,6 +11,8 @@ namespace Meibuyu\Micro\Repository\Contracts; ...@@ -11,6 +11,8 @@ namespace Meibuyu\Micro\Repository\Contracts;
interface RepositoryInterface interface RepositoryInterface
{ {
public function list();
public function all($columns = array('*')); public function all($columns = array('*'));
public function paginate($perPage = 10, $columns = array('*')); public function paginate($perPage = 10, $columns = array('*'));
......
...@@ -121,6 +121,11 @@ abstract class BaseRepository implements RepositoryInterface ...@@ -121,6 +121,11 @@ abstract class BaseRepository implements RepositoryInterface
return $this->model->get($columns); return $this->model->get($columns);
} }
public function list()
{
return $this->model->all();
}
public function with($relations) public function with($relations)
{ {
$this->model = $this->model->with($relations); $this->model = $this->model->with($relations);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment