create new controller and fix the other
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -14,4 +15,12 @@ class Harim extends Model
|
||||
public function histories(): HasMany
|
||||
{
|
||||
return $this->hasMany(HarimHistory::class);
|
||||
}}
|
||||
}
|
||||
|
||||
protected function polygon(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => json_decode($value)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user