| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function rules() |
||
| 37 | { |
||
| 38 | $user = backpack_auth()->user(); |
||
| 39 | |||
| 40 | return [ |
||
| 41 | backpack_authentication_column() => [ |
||
| 42 | 'required', |
||
| 43 | backpack_authentication_column() == 'email' ? 'email' : '', |
||
| 44 | Rule::unique($user->getTable())->ignore($user->getKey(), $user->getKeyName()), |
||
| 45 | ], |
||
| 46 | 'name' => 'required', |
||
| 47 | ]; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |