mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-20 21:13:59 +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:
@@ -10,8 +10,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* Class SegmentConstant
|
||||
* @package App\Models
|
||||
*
|
||||
* @property \App\Models\Segment segment_id
|
||||
* @property string detail
|
||||
* @property int $segment_id
|
||||
* @property object $detail
|
||||
*/
|
||||
class SegmentConstant extends AbstractModel
|
||||
{
|
||||
@@ -19,15 +19,17 @@ class SegmentConstant extends AbstractModel
|
||||
|
||||
protected $table = 'segment_constants';
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
// protected $casts = [
|
||||
// 'detail' => 'array',
|
||||
// ];
|
||||
|
||||
public function getDetailAttribute($value)
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return $value ? json_decode($value) : [];
|
||||
return [
|
||||
'detail' => 'object',
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user