@@ -190,9 +190,9 @@ static function (): EloquentBuilder {
190
190
' "table_alias_1"."name" as "table_alias_1_name", ' .
191
191
' "table_alias_1"."created_at" as "table_alias_1_created_at" ' .
192
192
'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" = ?) ' .
194
194
' 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") ' .
196
196
' as "table_alias_1" on "table_alias_1"."id" = "table_alias_0"."belongs_to_c_id" ' .
197
197
'order by ' .
198
198
' "table_alias_0_name" asc, ' .
@@ -201,9 +201,7 @@ static function (): EloquentBuilder {
201
201
' "table_alias_1_created_at" desc, ' .
202
202
' "table_a"."name" asc ' ,
203
203
'bindings ' => [
204
- 34 ,
205
204
'a ' ,
206
- 78 ,
207
205
],
208
206
],
209
207
static function (): EloquentBuilder {
@@ -242,10 +240,9 @@ static function (): EloquentBuilder {
242
240
' "table_alias_1"."created_at" as "table_alias_1_created_at" ' .
243
241
'from "table_a" ' .
244
242
'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" = ? ' .
246
244
') 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" ' .
249
246
') as "table_alias_1" on "table_alias_1"."model_b_id" = "table_alias_0"."id" ' .
250
247
'order by ' .
251
248
' "table_alias_0_name" asc, ' .
@@ -254,9 +251,7 @@ static function (): EloquentBuilder {
254
251
' "table_alias_1_created_at" desc, ' .
255
252
' "table_a"."name" asc ' ,
256
253
'bindings ' => [
257
- 12 ,
258
254
'b ' ,
259
- 56 ,
260
255
],
261
256
],
262
257
static function (): EloquentBuilder {
@@ -295,24 +290,21 @@ static function (): EloquentBuilder {
295
290
' "table_alias_1"."created_at" as "table_alias_1_created_at" ' .
296
291
'from "table_a" ' .
297
292
'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" = ? ' .
305
299
'order by ' .
306
300
' "table_alias_0_name" asc, ' .
307
301
' "table_alias_0_created_at" desc, ' .
308
302
' "table_alias_1_name" desc, ' .
309
303
' "table_alias_1_created_at" desc, ' .
310
304
' "table_a"."name" asc ' ,
311
305
'bindings ' => [
312
- 12 ,
313
- SortBuilderTest__ModelA::class,
314
306
'c ' ,
315
- 56 ,
307
+ SortBuilderTest__ModelA::class ,
316
308
SortBuilderTest__ModelB::class,
317
309
],
318
310
],
0 commit comments