查询所有数据 Post::all(['title']); Post::all(['id','title','subtitle','published_at']); 查询id = 1 的title Post::where('id',1)->get(['title']); Post::find(1, ['id', 'title','subtitle']); Post::get(['id', 'title','subtitle']);
Laravel 5.5 Model 查询字段
猜你喜欢
转载自blog.csdn.net/qq_25194685/article/details/105019038
今日推荐
周排行