Let's say i have data coming from my controller through Javascript.
So the data is paginated and i want display pagination result inside the javascript. I mean...I want to use the links() method inside javascript.
Controller
$schedules= DB::table('schedules')
->paginate(4);
Javascript,
success:function(schedules)
{
console.log(schedules);
$('#table').append(' <ul class="pager">'+{{ $schedules>links() }}+'</ul>');
})
But unfortunately not working, any help guys?