类似tp框架中的field
field([‘salesman_id’,’salesman_name’,’salesman_mobile’])
- 1
$data = ModelA::find($id, [‘column1’, ‘column2’]); $data = ModelA::first([‘column1’, ‘column2’]); $data = ModelA::where([‘column1’, ‘=’, ‘value’])->get([‘column1’, ‘column2’]);
转载请注明:懒人档案室 » laravel返回指定字段