@@ -190,9 +190,9 @@ static function (): EloquentBuilder {
190190 ' "table_alias_1"."name" as "table_alias_1_name", ' .
191191 ' "table_alias_1"."created_at" as "table_alias_1_created_at" ' .
192192 'from "table_a" ' .
193- 'left join (select * from "table_b" where "table_b"."id" = ? and " a" = ?) ' .
193+ 'left join (select * from "table_b" where "a" = ?) ' .
194194 ' as "table_alias_0" on "table_alias_0"."id" = "table_a"."belongs_to_b_id" ' .
195- 'left join (select * from "table_c" where "table_c"."id" = ? ) ' .
195+ 'left join (select * from "table_c") ' .
196196 ' as "table_alias_1" on "table_alias_1"."id" = "table_alias_0"."belongs_to_c_id" ' .
197197 'order by ' .
198198 ' "table_alias_0_name" asc, ' .
@@ -201,9 +201,7 @@ static function (): EloquentBuilder {
201201 ' "table_alias_1_created_at" desc, ' .
202202 ' "table_a"."name" asc ' ,
203203 'bindings ' => [
204- 34 ,
205204 'a ' ,
206- 78 ,
207205 ],
208206 ],
209207 static function (): EloquentBuilder {
@@ -242,10 +240,9 @@ static function (): EloquentBuilder {
242240 ' "table_alias_1"."created_at" as "table_alias_1_created_at" ' .
243241 'from "table_a" ' .
244242 'left join (select * from "table_b" where ' .
245- ' "table_b"."model_a_id" = ? and "table_b"."model_a_id" is not null and " b" = ? ' .
243+ ' "b" = ? ' .
246244 ') as "table_alias_0" on "table_alias_0"."model_a_id" = "table_a"."id" ' .
247- 'left join (select * from "table_c" where ' .
248- ' "table_c"."model_b_id" = ? and "table_c"."model_b_id" is not null ' .
245+ 'left join (select * from "table_c" ' .
249246 ') as "table_alias_1" on "table_alias_1"."model_b_id" = "table_alias_0"."id" ' .
250247 'order by ' .
251248 ' "table_alias_0_name" asc, ' .
@@ -254,9 +251,7 @@ static function (): EloquentBuilder {
254251 ' "table_alias_1_created_at" desc, ' .
255252 ' "table_a"."name" asc ' ,
256253 'bindings ' => [
257- 12 ,
258254 'b ' ,
259- 56 ,
260255 ],
261256 ],
262257 static function (): EloquentBuilder {
@@ -295,24 +290,21 @@ static function (): EloquentBuilder {
295290 ' "table_alias_1"."created_at" as "table_alias_1_created_at" ' .
296291 'from "table_a" ' .
297292 'left join (select * from "table_b" where ' .
298- ' "table_b"."morphable_a_id" = ? and "table_b"."morphable_a_id" is not null and ' .
299- ' "table_b"."morphable_a_type" = ? and "c" = ? ' .
300- ') as "table_alias_0" on "table_alias_0"."morphable_a_id" = "table_a"."id" ' .
301- 'left join (select * from "table_c" where ' .
302- ' "table_c"."morphable_b_id" = ? and "table_c"."morphable_b_id" is not null and ' .
303- ' "table_c"."morphable_b_type" = ? ' .
304- ') as "table_alias_1" on "table_alias_1"."morphable_b_id" = "table_alias_0"."id" ' .
293+ ' "c" = ? ' .
294+ ') as "table_alias_0" on "table_alias_0"."morphable_a_id" = "table_a"."id" and ' .
295+ ' "table_alias_0"."morphable_a_type" = ? ' .
296+ 'left join (select * from "table_c" ' .
297+ ') as "table_alias_1" on "table_alias_1"."morphable_b_id" = "table_alias_0"."id" and ' .
298+ ' "table_alias_1"."morphable_b_type" = ? ' .
305299 'order by ' .
306300 ' "table_alias_0_name" asc, ' .
307301 ' "table_alias_0_created_at" desc, ' .
308302 ' "table_alias_1_name" desc, ' .
309303 ' "table_alias_1_created_at" desc, ' .
310304 ' "table_a"."name" asc ' ,
311305 'bindings ' => [
312- 12 ,
313- SortBuilderTest__ModelA::class,
314306 'c ' ,
315- 56 ,
307+ SortBuilderTest__ModelA::class ,
316308 SortBuilderTest__ModelB::class,
317309 ],
318310 ],
0 commit comments