Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="custom-radio">
- <input type="checkbox" class="batchCheckbox" name="batch[]" value=" {{$item->indivgroup_option}}">
- <label><span></span>{{ ($item->indivgroup_option =='i')?"Individual Tour":"Group Tour" }}</label>
- </div>
- @endforeach
- var categories;
- var getfilters = function () {
- $.ajax({
- type: 'POST',
- headers: {
- 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
- },
- url:'{{URL::to('offer-category')}}',
- data: {categories: categories},
- error: function(e) {
- console.log(e.responseText);
- },
- success: function (data) {
- console.log(data);
- $('#myResponse').html(data);
- }});
- };
- $(document).ready(function() {
- $('input[type="checkbox"]').on('change', function(event) {
- event.preventDefault();
- categories = $("input:checkbox:checked").map(function(){
- return $(this).val();
- }).get(); // <----
- $('#myResponse').html(categories.toString()); // <---- 'one,two,three;
- getfilters();
- });
- });
- public function getoffergroup(Request $request)
- {
- $input = array(Input::get('categories'));
- $posts=Offer::whereIn('indivgroup_option' , $input)->get();
- $categories = Category::getGroup();
- return response()->view('offer.archive', compact('offers', 'categories'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement