mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor, docker
This commit is contained in:
+13
-8
@@ -8,11 +8,10 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class File
|
||||
* @package App\Models
|
||||
* @version August 4, 2020, 4:36 am
|
||||
*
|
||||
* @property \App\Models\Document document_id
|
||||
* @property text file
|
||||
* @property int file_type_id
|
||||
* @property int $document_id
|
||||
* @property object $file
|
||||
* @property int $file_type_id
|
||||
*/
|
||||
class File extends AbstractModel
|
||||
{
|
||||
@@ -22,10 +21,16 @@ class File extends AbstractModel
|
||||
|
||||
protected $fillable = ['file'];
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
public function getFileAttribute($value)
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return $value ? json_decode($value) : [];
|
||||
return [
|
||||
'file' => 'object',
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user