© 2026 Hedgehog Software, LLC

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

Action run code and open url in new tab

Is there a way, to open a new tab in the
action
action
method of an (Table-)
Action
Action
? Something like this:

Action::make("action")
    ->action(function ($record, Action $action) {
        // run some code and then open a new tab with the url generated from the code
    })
Action::make("action")
    ->action(function ($record, Action $action) {
        // run some code and then open a new tab with the url generated from the code
    })


I know, there is the method
url
url
, but I wanna run the code only, when the user clicks on the button. The action will generate a token (and save it to db) and the token will be attached to the url.

Since I wanna have a new tab,
redirect
redirect
isn't an option. Is there a way, to just call JS on an action?
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

Table action to open url in new tab (asynchronous)
FilamentFFilament / ❓┊help
3y ago
Table open url in new tab
FilamentFFilament / ❓┊help
3y ago
Possible to open url in new tab with table form action?
FilamentFFilament / ❓┊help
3y ago
Open View Action in new tab?
FilamentFFilament / ❓┊help
2y ago