Issues (7)

src/macros/leftJoinRelation.php (1 issue)

1
<?php
2
3
use Illuminate\Database\Eloquent\Builder;
4
5
Builder::macro('leftJoinRelation', function (string $relationName, $operator = '=') {
6
    $relation = $this->getRelation($relationName);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
7
8
    return $this->leftJoin(
9
        $relation->getRelated()->getTable(),
10
        $relation->getQualifiedForeignKeyName(),
11
        $operator,
12
        $relation->getQualifiedParentKeyName()
13
    );
14
});
15