0

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

3
  • 1
    Could you try $value[1]->toDateString()? Commented Sep 13, 2017 at 1:53
  • check this laravel.com/docs/5.5/helpers#method-array-pluck Commented Sep 13, 2017 at 1:54
  • @CUGreen great that works perfectly, thx Commented Sep 13, 2017 at 3:05

1 Answer 1

1

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();

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.