biishmar

html

<a href="/?date=next" data-count=1 > 

javascript

$('a').click(function() {
count = $(this).attr('data-count');

href = location.href + '&count=' + count;

location.href = href;
});

php

public function show(Hour $post){
        if(request()->has('date')){
            if(request('date') == 'next'){
                dd(request('count')); // This value is from javascript
            }
        }
    }

Return to Thread...