'json', 'extends' => 'json']; protected $appends = ['picture']; protected $fillable = ['status']; public function getPictureAttribute($value): string { return $this->pictures[0] ?? ''; } public function supplier() { return $this->belongsTo(Supplier::class)->withTrashed(); } public function category() { return $this->belongsTo(Category::class); } }