This is a very nice approach to render a table with sortable columns in Laravel PHP framework:
link.
As stated in the comments, it needs a litle cleanup. One case is when a name for a non-existent column is passed in the s
parameter. In such case and exception is thrown.