📅  最后修改于: 2022-03-11 14:53:59.103000             🧑  作者: Mango
$query = Role::join('users', 'roles.id', '=', 'users.role_id');
$user = User::all();
$users = $query->select('users.*', 'roles.name as role_name')->where('users.deleted_at', null)->paginate(10);