/home/techb158/immovalet.com/platform/plugins/blog/src/Repositories/Eloquent
Edit: /home/techb158/immovalet.com/platform/plugins/blog/src/Repositories/Eloquent/TagRepository.php (1268B)
model
->with('slugable')
->where('status', BaseStatusEnum::PUBLISHED)
->orderBy('created_at', 'desc');
return $this->applyBeforeExecuteQuery($data)->get();
}
/**
* {@inheritDoc}
*/
public function getPopularTags($limit, array $with = ['slugable'], array $withCount = ['posts'])
{
$data = $this->model
->with($with)
->withCount($withCount)
->orderBy('posts_count', 'DESC')
->limit($limit);
return $this->applyBeforeExecuteQuery($data)->get();
}
/**
* {@inheritDoc}
*/
public function getAllTags($active = true)
{
$data = $this->model;
if ($active) {
$data = $data->where('status', BaseStatusEnum::PUBLISHED);
}
return $this->applyBeforeExecuteQuery($data)->get();
}
}