You can use
$data = array();
$objects = agegroup::all();
foreach($objects as $object){
$object->first = 'Example';
$object->second = 'Example 1';
$data[] = $object;
}
$roles = $data;
Hope to help you
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community