Eloquent column list by key with array as values?
發表於 : 2016-12-26 10:24:30
http://stackoverflow.com/questions/2413 ... -as-values
代碼: 選擇全部
$drivertypes = DriverType::all()->keyBy('id')->ToArray();
dd($drivertypes);