I am using this DataTable plugin for Laravel, which is for using This jQuery DataTable plugin.
I Followed the instructions found here, so this is my controller:
class FeedbackController extends Controller {
public function UserFeedback(Request $request) {
$t = Datatable::make(new CollectionProvider(FeedbackModel::all()))
->column('overall')
->build();
if ($t->shouldHandle()) {
return $t->handleRequest();
}
return view('admin.feedback', ['datatable' => $t->view()]);
}
}
And this is in my view:
{{
$datatable->html()
}}
But for some reason when I load the page it is outputting the html with htmlentities like this:
<table id="dataTable">
</table><script type="text/javascript">
jQuery(document).ready(function () {
// dynamic table
oTable = jQuery('#dataTable').DataTable({
"processing": true,
"serverSide": true,
"ajax": "/",
"columns": [
{ 'data': 'overall' },
]
});
});
</script>
Why is it doing this?