3

'lists' 方法确实检索列的值列表,但我希望该方法检索值但不重复,如何实现?

    $types = DB::table('events')->lists('type');
4

1 回答 1

11

如果您只需要获得不同的值,您应该这样做:

$types = DB::table('lists')->distinct()->lists('type');
于 2013-11-13T10:55:01.820 回答