1
I’m trying to get the value of select "Categories" and put in the variable "$article" using Laravel’s Slides, but I’m not finding how to do this. Someone can give me a light?
<?php
$categories = DB::table('products')->select('category')->get();
$categories = array_unique($categories, SORT_REGULAR);
array_splice($categories, 0, 1); //exluindo os produtos que ainda não tem pategorias
?>
<label class="control-label">Filtro:</label>
<div class="">
<a href="#" data-open-in="picker" data-picker-close-text="OK" data-back-on-select="true" class="item-link smart-select">
<select class="products_qto select-filter-cat" name="categories" id="filter-cat" >
<option selected>ARTIGOS</option>
@foreach ($categories as $cat_item)
<option value="{{$cat_item->category}}">{{$cat_item->category}}</option>
@endforeach
</select>
</a>
</div>
<?php
$artigo = '????';
?>