Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel relations find

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