A nice take on column sorting in Laravel

This is a very nice approach to render a table with sortable columns in Laravel PHP framework:


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.

Leave a Reply

Your email address will not be published. Required fields are marked *