laravel中使用model怎樣得到指定字段信息
2 回答

慕粉2310427102
TA貢獻1條經(jīng)驗 獲得超0個贊
$list?=?District::where('level','province') ????->get(['id','title?as?text']);

胡說叔叔
TA貢獻1804條經(jīng)驗 獲得超8個贊
指定查詢子句 (Select Clause)
$users = DB::table('users')->select('name', 'email')->get();
$users = DB::table('users')->distinct()->get();
$users = DB::table('users')->select('name as user_name')->get();
希望可以幫到你!~~
- 2 回答
- 0 關(guān)注
- 4010 瀏覽
添加回答
舉報
0/150
提交
取消