Reputation: 45
please help me.
I've got the raw SQL
WITH collections AS (
SELECT
...
FROM
...
)
SELECT
...
FROM collections c1
LEFT JOIN collections c2
...
How I can write it using Laravel QueryBuilder?
Upvotes: 0
Views: 2673
Reputation: 1387
You may use the RAW method of Laravel's Query Builder (https://laravel.com/docs/5.3/queries#raw-expressions). Just be careful with potential SQL injection loopholes.
Upvotes: 1