iterate multiple actions in action group
I'm working on a project where has a submission that accepts multiple files with various file types, I'm trying add multiple buttons that represent files and when any of them is clicked this file is downloaded and these buttons should be grouped in an action group. Hence, I'm trying to add a function inside the action group that gets the files from the record then iterates on them so each file can have a button. But that doesn't seem to work due to
ActionGroup::
not accepting a closure or an array with a closure inside. So initially I managed to create a single action that when clicked it fetches the links then redirects to a blade file which contains a JS code that manages to open each file in a new tab
1 Reply
Please note that the files are stored via Spatie media library
The other issue with the code i'm working with is that usually the user has to disable pop-up blocker in order to get the files too which inconvenient for some due to having pop-up blocker applied by default
Any help please ?