Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function apply($model, RepositoryInterface $repository) |
||
30 | { |
||
31 | if ($this->request->email) { |
||
32 | $model = $model |
||
33 | ->where('email', '=', $this->request->email) |
||
34 | ->orWhere('email', '=', $this->request->username) |
||
35 | ->orWhere('username', '=', $this->request->username); |
||
36 | } else { |
||
37 | $model = $model |
||
38 | ->where('username', '=', $this->request->username) |
||
39 | ->orWhere('email', '=', $this->request->username); |
||
40 | } |
||
41 | |||
42 | return $model; |
||
43 | } |
||
45 |