array_get($cars, 'models.0')
Aug 29, 2021
5
Level 1
How can i get only the first element of an array ?
Hi, this is my first post and i am new in Laravel.
In my laravel app this code generate a list of elements:
array_get($cars, 'models')
How can i change it so i can get only the first element from the list?
i tried array_first but it doesn't work.
Any help would be very much appreciated.
Please or to participate in this conversation.