| Total Complexity | 1 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Contact extends Model |
||
| 11 | { |
||
| 12 | use HasFactory; |
||
| 13 | use HasUUID; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * The attributes that are mass assignable. |
||
| 17 | * |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $fillable = [ |
||
| 21 | 'name', |
||
| 22 | 'user_id', |
||
| 23 | 'source_type', |
||
| 24 | 'source_id', |
||
| 25 | ]; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Scope a query to only include active users. |
||
| 29 | * |
||
| 30 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
| 31 | * @param string $user_id |
||
| 32 | * @return \Illuminate\Database\Eloquent\Builder |
||
| 33 | */ |
||
| 34 | public function scopeForUser($query, $user_id) |
||
| 39 |