Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
'lists' 方法确实检索列的值列表,但我希望该方法检索值但不重复,如何实现?
$types = DB::table('events')->lists('type');
如果您只需要获得不同的值,您应该这样做:
$types = DB::table('lists')->distinct()->lists('type');