Update the view rendering logic to handle different Statamic Antlers versions. For "regex" versions, use the Laravel view helper with a check to convert $data to an array if it is a collection. For other versions, consistently
use the Statamic View facade with $data->all() to ensure $data is always passed as an array. This change guarantees that view data is correctly formatted regardless of the Antlers version or the data type.
Update the view rendering logic to handle different Statamic Antlers versions. For "regex" versions, use the Laravel view helper with a check to convert $data to an array if it is a collection. For other versions, consistently use the Statamic View facade with $data->all() to ensure $data is always passed as an array. This change guarantees that view data is correctly formatted regardless of the Antlers version or the data type.