B
B
BonBon Slick2017-04-19 16:46:54
Laravel
BonBon Slick, 2017-04-19 16:46:54

How to get the value of an object in Laravel 3.9?

An array of objects comes in, I can’t filter and select the desired value as in the 5th Laravel.
And there is nothing special in the docks.

array (size=1)
  0 => 
    object(stdClass)[567]
      public 'id' => string '51' (length=2)
      public 'title' => string 'Видео' (length=10)
      public 'alias' => string 'video' (length=5)
      public 'path' => string 'video' (length=5)

I try:
dd(object_get($foldersFiltered, 'id' . 51));
// null

I also tried to make it a collection, but the request already returns an array of objects.
I need to extract path . No cycles, one line like in Lara 5.
How???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UksusoFF, 2017-04-19
@BonBonSlick

It would be time to update.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question