© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Aaron Lawrence

Access handleRecordCreation on resource

I have a create class in one of my resources, within this resource i use the
handleRecordCreation()
handleRecordCreation()
However i want to access this method when doing a form action for a resource manager.

->headerActions([
                Tables\Actions\CreateAction::make()
                    ->using(function (array $data, RelationManager $livewire) {
                        //...
                    }),
])
->headerActions([
                Tables\Actions\CreateAction::make()
                    ->using(function (array $data, RelationManager $livewire) {
                        //...
                    }),
])


This is in the table actions of my tables

class CreateAgreement extends CreateRecord
{
    protected static string $resource = AgreementResource::class;

    protected function handleRecordCreation(array $data): Model
    {
        // ..
    }
}
class CreateAgreement extends CreateRecord
{
    protected static string $resource = AgreementResource::class;

    protected function handleRecordCreation(array $data): Model
    {
        // ..
    }
}


Rather than duplicate, or create a laravel action class or similar, is there a desired "filament way" to use the logic from
handleRecordCreation()
handleRecordCreation()
from within the
using()
using()
method on table actions.
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

handleRecordCreation
FilamentFFilament / ❓┊help
3y ago
handlerecordcreation testing ?
FilamentFFilament / ❓┊help
2y ago
Create Repeater Data on handleRecordCreation
FilamentFFilament / ❓┊help
16mo ago
How to access resource from resource?
FilamentFFilament / ❓┊help
3y ago