| Total Complexity | 1 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Resource extends Model |
||
| 18 | { |
||
| 19 | use CrudTrait; |
||
| 20 | use HasTranslations; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * The model's attibutes that admin cannot change. |
||
| 24 | * |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $guarded = ['id']; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The model's attributes that are mass assignable. |
||
| 31 | * |
||
| 32 | * @var array |
||
| 33 | */ |
||
| 34 | protected $fillable = ['name', 'file']; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * The model's attributes that are translated. |
||
| 38 | * |
||
| 39 | * @var array |
||
| 40 | */ |
||
| 41 | protected $translatable = ['name']; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set the value of file name attribute in DB and upload file to disk. |
||
| 45 | * |
||
| 46 | */ |
||
| 47 | public function setFileAttribute($value) |
||
| 52 |