mobile checkout

This commit is contained in:
merdan 2020-02-25 17:59:55 +05:00
parent cb212b4d9d
commit 6f78dd3454
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class PublicController extends Controller
[$order, $data] = $this->sorts_filters();
$data['category'] = $category;
$data['sub_cats'] = $category->children()
->withLiveEvents($order, $data['start'], $data['end'], $category->events_limit + 3)//wiered
->withLiveEvents($order, $data['start'], $data['end'], $category->events_limit)//wiered
->whereHas('cat_events',
function ($query) use($data){
$query->onLive($data['start'], $data['end']);

View File

@ -125,7 +125,7 @@ class Category extends \Illuminate\Database\Eloquent\Model{
public function scopeWithLiveEvents($query, $orderBy, $start_date = null,$end_date = null, $limit = 8 ){
return $query->with(['cat_events' => function($query) use ($start_date, $end_date, $limit, $orderBy) {
$query->select('id','title_'.Config::get('app.locale'),'description_'.Config::get('app.locale'),'category_id','sub_category_id','start_date')
->limit($limit)
->take($limit)
->with('starting_ticket')
->withCount(['stats as views' => function($q){
$q->select(DB::raw("SUM(views) as v"));}])