© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
JimKarvo

Is it possible to customize since()?

I am tryinig to calculate the remaing days of user's subscription, but I get one day less, maybe because the mySql table of expired_date is set to 'yyyy-mm-dd', and the carbon is based on dateTime!

So, is it possible, without change my date at mysql, to recalculate the since() by adding one day?

what I have already:

Carbon::setLocale('el');
  //...
  Tables\Columns\TextColumn::make('credits.expiration_date')
                    ->sortable()
                    ->since()
                    ->placeholder('Δοκιμαστική περίοδος')
                    ->tooltip(function ($record){
                        //return $record->credits->expiration_date as human readable, in greek language. don't include time, only date
                        return Carbon::parse($record->credits->expiration_date)->isoFormat('LL');

                    })
                    ->label('Ημερομηνία Λήξης'),
Carbon::setLocale('el');
  //...
  Tables\Columns\TextColumn::make('credits.expiration_date')
                    ->sortable()
                    ->since()
                    ->placeholder('Δοκιμαστική περίοδος')
                    ->tooltip(function ($record){
                        //return $record->credits->expiration_date as human readable, in greek language. don't include time, only date
                        return Carbon::parse($record->credits->expiration_date)->isoFormat('LL');

                    })
                    ->label('Ημερομηνία Λήξης'),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Is it possible to customize table view files?
FilamentFFilament / ❓┊help
3y ago
Is it possible to customize the options of a MorphToSelect?
FilamentFFilament / ❓┊help
3mo ago
I need customize the login page with two forms, it is possible?
FilamentFFilament / ❓┊help
12mo ago
Fully customize login screen, possible?
FilamentFFilament / ❓┊help
3y ago