Changes in core repository made

This commit is contained in:
Prashant Singh 2019-09-04 13:36:34 +05:30
parent c7f1e4996a
commit 0468a1fdd6
2 changed files with 14 additions and 14 deletions

View File

@ -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"

View File

@ -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