Specific value from model

Good Afternoon,

I have a controller that returns a view and model

$content = Content::find([‘page’ => ‘/site/index’])->all();

In the view i would like to display in different places the content of $content

So the table has these fields:

ID => 1
Page => Index
Region => region1
Data => testdata

I want to in the view use the data value where region = region1

then use the data value where region = region2

ideally i didn’t want to have to build multiple queries for each region hence trying to extract the data from the model.

Unclear what are you trying to achieve. You can loop through $content to get whatever value you need.

Thank you.

I was hoping to extract the value without having to loop but looks like that is the way to do it.