Skip to main content

Money Column and Mutate Data Before Saving/Showing

Premium
3:48

The Full Lesson is Only for Premium Members

Want to access all of our courses? (31 h 16 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

H
hdaklue ✓ Link copied!

Is it okay to move this part to the model itself, using mutators and accessors?

PK
Povilas Korop ✓ Link copied!

Never tried, I was doing it according to Filament docs. It should work on the Model level but may have negative consequences in how Filament then shows that data. Please try.

H
hdaklue ✓ Link copied!

Worked fine but with setting should convert to true.

Tables\Columns\TextColumn::make("default_rate")->money(
                    config("app.currency"),
                    true
                )