laravel-eloquent-case
laravel-eloquent-case copied to clipboard
CASE statement support for Laravel Query Builder.
Would it be possible to add support for earlier versions of Laravel that are already in production, may be up to 5.0 or 5.5 ?
The following syntax is not currently possible to achieve without making use of `raw` methods. ```sql CASE WHEN price = 10 AND active = 1 THEN 20 END ``` I'm...
I have a one-off case where some additional CASE output has to be added to the SELECT, and the criteria for at least one of them relies on a nested...
Code causing the error: ``` echo CaseBuilder ::caseRaw('Some Code Here') ->when(Match1)->then(0) ->when(Match2)->then(1) ->toRaw(); ``` --- Error: ``` { "error": "/var/www/html/vendor/illuminate/container/Container.php:1126 Target [Illuminate\\Database\\ConnectionInterface] is not instantiable while building [..., AgliPanci\\LaravelCase\\Query\\CaseBuilder, Illuminate\\Database\\Query\\Builder]....