feat:新增用户导出

This commit is contained in:
JaguarJack
2023-07-05 17:18:12 +08:00
parent 3bae9d7761
commit 164aa40738
3 changed files with 23 additions and 1 deletions

View File

@@ -159,4 +159,16 @@ class UserController extends Controller
return $builder;
})->getList();
}
/**
* @return void
*/
public function export()
{
return User::query()
->select('id', 'username', 'email', 'created_at')
->without('roles')
->get()
->download(['id', '昵称', '邮箱', '创建时间']);
}
}