I am trying to build a dataTable with custom filtering with the help of yajra datatable from here :
HTML table in view :
Looks like the ? in the Route is not used to define an optional parameter but a string instead:
Route::get('exams/student/get-exam-attempts/{user_slug}/{exam_slug?}', 'StudentQuizController@getExamAttemptsData');
Could you please change it and see what you get?
Route::get('exams/student/get-exam-attempts/{user_slug}/{exam_slug}', 'StudentQuizController@getExamAttemptsData');
Also, the query string you posted has a space after myyser123
, this could also explain the issue.
http:// localhost/lcbs/exams/student/get-exam-attempts/myuser123 ?draw=2&columns%5B0%5D%5Bdata%5D=0......search%5Bregex%5D=false&batch=22&_=1541684388689.
So I would suggest to check how the value is defined in the javascript code
url: '{{ $routeValue }}',