Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel relations find

/**
 * Get the user's oldest order.
 */
public function oldestOrder()
{
    return $this->hasOne(Order::class)->oldestOfMany();
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #relations #find
ADD COMMENT
Topic
Name
9+9 =