Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jeevan628's avatar

Select resource from different pages before trigger action

Hello

I'm wondering if there is a feature that let me to select resources from different pages before trigger the action. For example, I want to search for customer name "Anna" and select "Anna". Then, I search for customer name "Katie" and select "Katie". Then trigger an action like "Send Email" for the two of them at the same time.

Thanks :)

0 likes
3 replies
vincent15000's avatar

There is no feature like you describe in Laravel, but you can do this manually.

What I don't understand is that you say that the ressources come from different page. Can you explain ?

jeevan628's avatar

@vincent15000

I have about 6000 records of customer. So I go to page 1 (of the pagination) on index to pick a few customers, then page 2 and pick a few more etc. Then trigger an action on those customers that I picked. I think it's more likely I have to write a front end for this feature

1 like
vincent15000's avatar
Level 63

@jeevan628 Ok the pages are pagination pages.

To do what you want, you can store the selections in the session and then retrieve the selections from the session when you want to trigger action.

https://laravel.com/docs/9.x/session#interacting-with-the-session

$selectedCustomers = [];
session(['selectedCustomers' => $selectedCustomers]);
...
$value = session('selectedCustomers');

Each time you need to select new customers in your pages, you can retrieve the session value, add new customers in the array, and store the updated array.

Please or to participate in this conversation.