| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Source extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The "type" of the auto-incrementing ID. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $keyType = 'integer'; |
||
| 15 | |||
| 16 | protected $fillable = ['sour', 'titl', 'auth', 'data', 'text', 'publ', 'abbr', 'name', 'description', 'repository_id', 'author_id', 'publication_id', 'type_id', 'is_active', 'group', 'gid', 'quay', 'page']; |
||
| 17 | |||
| 18 | protected $attributes = ['is_active' => false]; |
||
| 19 | |||
| 20 | protected $casts = ['is_active' => 'boolean']; |
||
| 21 | |||
| 22 | public function repositories() |
||
| 23 | { |
||
| 24 | return $this->belongsTo(Repository::class); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function citations() |
||
| 28 | { |
||
| 29 | return $this->hasMany(Citation::class); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function publication() |
||
| 33 | { |
||
| 34 | return $this->belongsTo(Publication::class); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function type() |
||
| 40 | } |
||
| 41 | |||
| 42 | public function author() |
||
| 43 | { |
||
| 44 | return $this->belongsTo(Author::class); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getCitationListAttribute() |
||
| 50 | } |
||
| 51 | } |
||
| 52 |