begineeeerrrr
begineeeerrrr

Reputation: 343

Laravel, extract certain data in an array

How to get the data(only the date) on the highlighted area as shown in picture below?

foreach($row as $key => $value)
{
  //what should I dd() here?
}

array

Upvotes: 0

Views: 51

Answers (1)

parker_codes
parker_codes

Reputation: 3397

If you don't care about the keys, just do

foreach($row[1]->toDateString() as $date) {
    // do something here with $date
}

Otherwise, just $value[1]->toDateString();

Upvotes: 1

Related Questions