| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class FileLinkFiles extends Model |
||
| 8 | { |
||
| 9 | protected $primaryKey = 'link_file_id'; |
||
| 10 | protected $fillable = ['link_id', 'file_id', 'user_id', 'added_by', 'upload']; |
||
| 11 | protected $casts = [ |
||
| 12 | 'created_at' => 'datetime:M d, Y', |
||
| 13 | 'updated_at' => 'datetime:M d, Y' |
||
| 14 | ]; |
||
| 15 | |||
| 16 | public function fileLinks() |
||
| 17 | { |
||
| 18 | return $this->hasMany('App\FileLinks', 'link_id', 'link_id'); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function files() |
||
| 22 | { |
||
| 23 | return $this->hasOne('App\Files', 'file_id', 'file_id'); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function User() |
||
| 29 | } |
||
| 30 | } |
||
| 31 |