admin slider order
This commit is contained in:
parent
71397d78ba
commit
d64b25682c
|
|
@ -154,10 +154,16 @@ class PublicController extends Controller
|
|||
//todo implement with elastick search and scout
|
||||
$query = sanitise($request->get('q'));
|
||||
|
||||
$lc = config('app.locale');
|
||||
$events = Event::onLive()
|
||||
->with(['mainCategory','subCategory'])
|
||||
->where('title_ru','like',"%{$query}%")
|
||||
->orWhere('title_tk','like',"%{$query}%")
|
||||
->select('events.id',"events.title_{$lc}",'start_date','end_date',"events.description_{$lc}")
|
||||
->select("venues.venue_name_{$lc} as venue_name","categories.title_{$lc} as category_title")
|
||||
->join('venues','venues.id','=','events.venue_id')
|
||||
->join('categories','categories.id','=','events.category_id')
|
||||
// ->with(['mainCategory','subCategory'])
|
||||
->where('title_'.config('app.locale'),'like',"%{$query}%")
|
||||
->orWhere('venues.venue_name_'.config('app.locale'),'like',"%{$query}%")
|
||||
->orWhere('categories.title_'.config('app.locale'),'like',"%{$query}%")
|
||||
->withCount(['stats as views' => function($q){
|
||||
$q->select(DB::raw("SUM(views) as v"));}])
|
||||
->paginate(10);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="film">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-4 col-lg-4">
|
||||
<img class="film_img" src="{{asset($event->images->first()->image_path ?? '#')}}"/>
|
||||
<img class="film_img img-responsive" src="{{asset($event->images->first()->image_path ?? '#')}}" alt="{{$event->title}}"/>
|
||||
</div>
|
||||
<div class="col-md-8 col-lg-8 col-8">
|
||||
<div class="film_op">
|
||||
|
|
@ -12,6 +12,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<h2 class="film_name"><a href="{{$event->event_url}}">{{$event->title}}</a></h2>
|
||||
<h4>{{$event->category_title}}</h4>
|
||||
<h4>{{$event->venue_name}}</h4>
|
||||
<div id="desc">
|
||||
{!! Markdown::parse($event->description) !!}
|
||||
</div>
|
||||
|
|
@ -19,4 +21,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue