Domains: Fetch list of domains from database
This commit is contained in:
parent
b890432e5b
commit
d5789fdedf
7 changed files with 98 additions and 11 deletions
|
|
@ -10,6 +10,7 @@ use MailAccountAdmin\Frontend\Domains\DomainController;
|
|||
use MailAccountAdmin\Frontend\Login\LoginController;
|
||||
use MailAccountAdmin\Frontend\Dashboard\DashboardController;
|
||||
use MailAccountAdmin\Repositories\AdminUserRepository;
|
||||
use MailAccountAdmin\Repositories\DomainRepository;
|
||||
use PDO;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Slim\Views\Twig;
|
||||
|
|
@ -58,6 +59,11 @@ class Dependencies
|
|||
$c->get(self::DATABASE),
|
||||
);
|
||||
});
|
||||
$container->set(DomainRepository::class, function (ContainerInterface $c) {
|
||||
return new DomainRepository(
|
||||
$c->get(self::DATABASE),
|
||||
);
|
||||
});
|
||||
|
||||
// Helper classes
|
||||
$container->set(UserHelper::class, function (ContainerInterface $c) {
|
||||
|
|
@ -84,6 +90,7 @@ class Dependencies
|
|||
return new DomainController(
|
||||
$c->get(self::TWIG),
|
||||
$c->get(UserHelper::class),
|
||||
$c->get(DomainRepository::class),
|
||||
);
|
||||
});
|
||||
$container->set(AccountController::class, function (ContainerInterface $c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue