I want to generate random data in my views, specifically I want to go through the results of a query and each one assign a different color, all this in my views of Blade (Laravel) .
Something like this (similar to what I want to do):
$array = array('success', 'danger', 'info', 'warning');
$rand = rand(0,3);
echo $array[$rand];
Sure, all this in Blade .