| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Collection extends Model implements CollectionContract |
||
| 11 | { |
||
| 12 | use SoftDeletes; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $table = 'collections'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | protected $fillable = [ |
||
| 23 | 'collectable_id', |
||
| 24 | 'collectable_type', |
||
| 25 | 'user_id', |
||
| 26 | ]; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 30 | */ |
||
| 31 | public function collectable() |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
| 38 | * @param \Vetor\Contracts\Collect\Collectable\Models\Collectable $collectable |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | 1 | public function scopeWhereCollectable(Builder $query, $collectableClass) |
|
| 46 |