improve cods
This commit is contained in:
@@ -14,6 +14,7 @@ class Accident extends Model
|
||||
use ReceiptReportAble, HasFactory;
|
||||
|
||||
protected $guarded = [];
|
||||
protected $appends = ['link'];
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
@@ -118,4 +119,11 @@ class Accident extends Model
|
||||
get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
|
||||
);
|
||||
}
|
||||
|
||||
protected function link(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn (string $value) => env("PAYMENT_LINK")."/#/pay/".explode("/", $this->bill_code)[0]."/{$this->final_amount}",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user