I'm looking to edit a column to include a link. It's working, except the HTML is being escaped therefore rendered as text instead of HTML.
Not sure what I am missing to have the HTML not be escaped. I have passing a template as the second argument and placing the HTML::linkRoute call in the template file, but same result.
return Datatables::of($people)
->editColumn('firstname', '{!! HTML::linkRoute("person.show", $firstname, $userid) !!}')
->make(true);
And it returns:
firstname: "<a href="http://myurl.localhost/person/516073">SomeFirstName</a>"
Answering my own question. Solution was using the well documented raw columns.
return Datatables::of($people)
->editColumn('firstname', '{!! HTML::linkRoute("person.show", $firstname, $userid) !!}')
->rawColumns(['firstname'])
->make(true);
for versions above 8, u have to go to config/datatables.php file....and add your column name in ....raw => ['name_of your_column']
Most helpful comment
Answering my own question. Solution was using the well documented raw columns.