© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
14 replies
Noor

Old status update To New status

There is a form in which I have a status field and I want it to be saved and update in database for update my code is
protected function mutateFormDataBeforeSave(array $data): array 
    {
       
        $dbStatus = $this->record->fresh()->status_id;

        if ($dbStatus !== $data['status_id']) {
            $data['status_update'] = now();
        }
        return $data;
}
protected function mutateFormDataBeforeSave(array $data): array 
    {
       
        $dbStatus = $this->record->fresh()->status_id;

        if ($dbStatus !== $data['status_id']) {
            $data['status_update'] = now();
        }
        return $data;
}

But when I run it it keep changing my form updated_at which I dont want. I just want status_update to be changed when user change it.
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

On Update unlink old image
FilamentFFilament / ❓┊help
12mo ago
Creating redirects from old pages to new ones
FilamentFFilament / ❓┊help
2y ago
How to edit/update status directly on table column?
FilamentFFilament / ❓┊help
3y ago
Prevent old password as new password
FilamentFFilament / ❓┊help
2y ago