for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Lagdo\DbAdmin\Db\Driver\Facades;
/**
* Facade to user functions
*/
trait UserTrait
{
use AbstractTrait;
* Get the facade to user features
*
* @return UserFacade
protected function userFacade(): UserFacade
return $this->di()->g(UserFacade::class);
}
* Get the privilege list
* This feature is available only for MySQL
* @param string $database The database name
* @return array
public function getPrivileges(string $database = ''): array
$this->connectToServer();
$this->breadcrumbs()->clear()->item($this->utils->trans->lang('Privileges'));
return $this->userFacade()->getPrivileges($database);
* Get the privileges for a new user
public function newUserPrivileges(): array
return $this->userFacade()->newUserPrivileges();
* @param string $user The user name
* @param string $host The host name
public function getUserPrivileges(string $user, string $host, string $database): array
return $this->userFacade()->getUserPrivileges($user, $host, $database);