app/Models/Payment.php
use Illuminate\Database\Eloquent\Model; class Payment extends Model{ // public function getFormattedPaymentDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); return Carbon::parse($this->payment_date)->format($dateFormat); } //}