📜  laravel latest from relationship - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:45.282000             🧑  作者: Mango

代码示例1
/**
 * Get the user's most recent image.
 */
public function latestImage()
{
    return $this->morphOne(Image::class)->latestOfMany();
}