摘取属性里需要的键值 auth()->user()->projects()->pluck

auth()->user()->projects()->pluck('name', 'id');

id=>name

posted @ 2019-07-21 22:38  hakeer  阅读(118)  评论(0编辑  收藏  举报