📜  laravel eloquent hasmany select - PHP 代码示例

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

代码示例1
$data = \App\User::with('articles:id,title,user_id')->get();
// user_id is important in hasmay relationships