@@ -107,7 +107,7 @@ |
||
| 107 | 107 | ->wherePivot('relation', '=', Follow::RELATION_FOLLOW) |
| 108 | 108 | ->withPivot('followable_type', 'relation', 'created_at') |
| 109 | 109 | ->addSelect("{$targetTable}.*", DB::raw("{$tablePrefixedForeignKey} IS NOT NULL as {$eachOtherKey}")) |
| 110 | - ->leftJoin("{$table} as pivot_followables", function ($join) use ($table, $class, $foreignKey) { |
|
| 110 | + ->leftJoin("{$table} as pivot_followables", function($join) use ($table, $class, $foreignKey) { |
|
| 111 | 111 | $join->on('pivot_followables.followable_type', '=', DB::raw(\addcslashes("'{$class}'", '\\'))) |
| 112 | 112 | ->on('pivot_followables.followable_id', '=', "{$table}.{$foreignKey}") |
| 113 | 113 | ->on("pivot_followables.{$foreignKey}", '=', "{$table}.followable_id"); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | ->wherePivot('relation', '=', Follow::RELATION_FOLLOW) |
| 50 | 50 | ->withPivot('followable_type', 'relation', 'created_at') |
| 51 | 51 | ->addSelect("{$userTable}.*", DB::raw("{$tablePrefixedForeignKey} IS NOT NULL as {$eachOtherKey}")) |
| 52 | - ->leftJoin("{$table} as pivot_followables", function ($join) use ($table, $class, $foreignKey) { |
|
| 52 | + ->leftJoin("{$table} as pivot_followables", function($join) use ($table, $class, $foreignKey) { |
|
| 53 | 53 | $join->on('pivot_followables.followable_type', '=', DB::raw(\addcslashes("'{$class}'", '\\'))) |
| 54 | 54 | ->on('pivot_followables.followable_id', '=', "{$table}.{$foreignKey}") |
| 55 | 55 | ->on("pivot_followables.{$foreignKey}", '=', "{$table}.followable_id"); |