Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class FileStatus extends Model |
||
13 | { |
||
14 | use SoftDeletes, HasRevisions; |
||
15 | |||
16 | protected $table = 'uploadfile_file_statuses'; |
||
17 | |||
18 | protected $fillable = [ |
||
19 | 'file_id', 'status', 'created_by' |
||
20 | ]; |
||
21 | |||
22 | /** |
||
23 | * Prepare a date for array / JSON serialization. |
||
24 | * |
||
25 | * @param \DateTimeInterface $date |
||
26 | * @return string |
||
27 | */ |
||
28 | 4 | protected function serializeDate(\DateTimeInterface $date) |
|
31 | } |
||
32 | |||
33 | |||
34 | 1 | public function file() |
|
35 | { |
||
36 | 1 | return $this->belongsTo(File::class); |
|
37 | } |
||
38 | |||
39 | 5 | public function getCreatedByAttribute($createdById) |
|
42 | } |
||
43 | |||
45 |