lundi 15 octobre 2018

Laravel display collection items in view

I'm using a package called cybercog/laravel-love. This package includes a method that returns a collection of users who liked model

$sheet->collectLikers()

When I add this to my view it returns a collection of users just fine but how do I get just the users username for example.

[{"id":1,"first_name":null,"last_name":null,"email":"mem1@email.com","username":"mem1","email_verified_at":null,"created_at":"2018-10-15 16:45:14","updated_at":"2018-10-15 16:45:14"},{"id":2,"first_name":null,"last_name":null,"email":"mem2@email.com","username":"mem2","email_verified_at":null,"created_at":"2018-10-15 16:45:14","updated_at":"2018-10-15 16:45:14"}]

returns nothing as does



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire