bllim/laravel4-datatables-package — pull request #127 by JoshKoberstein (2014-07-31 00:43:40+00:00)
Title: Allowing trailing whitespace

$distributors = DB::table('distributors')
->select(
'distributors.id',
'distributors.company_name',
DB::raw('
CONCAT_WS(\', \',
IF(LENGTH(`address_1`), `address_1`, NULL),
IF(LENGTH(`address_2`), `address_2`, NULL),
IF(LENGTH(`city`), `city`, NULL),
IF(LENGTH(`state`), `state`, NULL),
IF(LENGTH(`zip`), `zip`, NULL)
) AS address
'),
DB::raw('
(
SELECT COUNT(*)
FROM redemptions
WHERE redemptions.distributor_id = distributors.id
) AS redemption_count
')
);

I like to format my DB::raws with space at the end. It would be great if the clean_columns regex accommodated this as per my commit. Thanks.