title = "Cenník parkovanie" url = "/cennik3" layout = "default" is_hidden = 0 == where('type',3) ->orderBy('rooms', 'asc') ->orderBy('id', 'asc'); $this['flats'] = $flats->get(); $floors = Flat::leftJoin('creas_realestate_floors', function ($join) { $join->on('creas_realestate_flats.floor_id', '=', 'creas_realestate_floors.id') ->where('creas_realestate_flats.type','=',3); })->groupBy('creas_realestate_floors.id'); $this['floors'] = $floors->get(); } function onFilterChange() { $floor_id = input('floor_id'); $status = input('status'); $price = input('price'); $flats = Flat::with('floors') ->where('type',3); if($floor_id) { $flats->where('floor_id', $floor_id); } if($status) { $flats->where('status', $status) ->orderBy('rooms', 'asc') ->orderBy('id', 'asc'); } if($price == 1) { $flats->where('status', '<', '3')->orderBy('price', 'asc' ); } elseif ($price == 2) { $flats->where('status', '<', '3')->orderBy('price', 'desc' ); } $this['flats'] = $flats->get(); } ?> ==

 

{% partial "tablepark" %}
označenie podlažie popis cena s DPH dostupnosť