Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel eloquent with

$users = User::with('podcasts')->get();

foreach ($users->flatMap->podcasts as $podcast) {
    echo $podcast->subscription->created_at;
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #eloquent
ADD COMMENT
Topic
Name
8+4 =