mobile checkout
This commit is contained in:
parent
cb212b4d9d
commit
6f78dd3454
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -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"));}])
|
||||
|
|
|
|||
Loading…
Reference in New Issue