Changes in core repository made
This commit is contained in:
parent
c7f1e4996a
commit
0468a1fdd6
|
|
@ -28,7 +28,7 @@
|
|||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "5.6.*",
|
||||
"laravel/tinker": "^1.0",
|
||||
"maatwebsite/excel": "3.1.x-dev",
|
||||
"maatwebsite/excel": "3.1.11",
|
||||
"nwidart/laravel-modules": "^3.2",
|
||||
"prettus/l5-repository": "^2.6",
|
||||
"tymon/jwt-auth": "dev-develop"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ abstract class Repository extends BaseRepository {
|
|||
public function findOneByField($field, $value = null, $columns = ['*'])
|
||||
{
|
||||
$model = parent::findByField($field, $value, $columns = ['*']);
|
||||
|
||||
|
||||
return $model->first();
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ abstract class Repository extends BaseRepository {
|
|||
public function findOneWhere(array $where, $columns = ['*'])
|
||||
{
|
||||
$model = parent::findWhere($where, $columns);
|
||||
|
||||
|
||||
return $model->first();
|
||||
}
|
||||
|
||||
|
|
@ -82,19 +82,19 @@ abstract class Repository extends BaseRepository {
|
|||
return $this->parserResult($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
$this->applyCriteria();
|
||||
$this->applyScope();
|
||||
// /**
|
||||
// * @return mixed
|
||||
// */
|
||||
// public function count()
|
||||
// {
|
||||
// $this->applyCriteria();
|
||||
// $this->applyScope();
|
||||
|
||||
$total = $this->model->count();
|
||||
$this->resetModel();
|
||||
// $total = $this->model->count();
|
||||
// $this->resetModel();
|
||||
|
||||
return $total;
|
||||
}
|
||||
// return $total;
|
||||
// }
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
|
|
|
|||
Loading…
Reference in New Issue