create new controller and fix the other

This commit is contained in:
2025-08-06 10:05:20 +03:30
parent 0e8b8fda7e
commit 43ad404635
6 changed files with 52 additions and 5 deletions

View File

@@ -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)
);
}
}