Files
portal-api/app/Providers/RepositoryProvider.php
T
2026-09-28 08:26:29 +07:00

161 lines
7.5 KiB
PHP

<?php
namespace App\Providers;
use App\Repositories\Addon\AddonCachedRepository;
use App\Repositories\Addon\AddonRepositoryInterface;
use App\Repositories\Admin\ProductCategory\ProductCategoryRepository;
use App\Repositories\Admin\ProductCategory\ProductCategoryRepositoryInterface;
use App\Repositories\Customer\CustomerCachedRepository;
use App\Repositories\Customer\CustomerRepositoryInterface;
use App\Repositories\Domain\DomainCachedRepository;
use App\Repositories\Domain\DomainRepositoryInterface;
use App\Repositories\Invoice\InvoiceRepository;
use App\Repositories\Invoice\InvoiceRepositoryInterface;
use App\Repositories\InvoiceAttachment\InvoiceAttachmentRepository;
use App\Repositories\InvoiceAttachment\InvoiceAttachmentRepositoryInterface;
use App\Repositories\InvoiceItem\InvoiceItemCachedRepository;
use App\Repositories\InvoiceItem\InvoiceItemRepositoryInterface;
use App\Repositories\Log\LogCachedRepository;
use App\Repositories\Log\LogRepositoryInterface;
use App\Repositories\Module\DnsServer\DnsServerCachedRepository;
use App\Repositories\Module\DnsServer\DnsServerRepositoryInterface;
use App\Repositories\Order\OrderRepository;
use App\Repositories\Order\OrderRepositoryInterface;
use App\Repositories\Payment\PaymentCachedReppository;
use App\Repositories\Payment\PaymentReppositoryInterface;
use App\Repositories\Setting\SettingCachedRepository;
use App\Repositories\Setting\SettingRepositoryInterface;
use App\Repositories\Staff\StaffRepository;
use App\Repositories\Staff\StaffRepositoryInterface;
use App\Repositories\Ticket\TicketCachedRepository;
use App\Repositories\Ticket\TicketRepositoryInterface;
use App\Repositories\TicketReply\TicketReplyCachedRepository;
use App\Repositories\TicketReply\TicketReplyRepositoryInterface;
use App\Repositories\Transaction\TransactionCachedRepository;
use App\Repositories\Transaction\TransactionRepositoryInterface;
use App\Repositories\Service\ServiceRepository;
use App\Repositories\Service\ServiceRepositoryInterface;
use Illuminate\Support\ServiceProvider;
use App\Repositories\Module\Hosting\HostingCachedRepository as ModuleHostingCachedRepository;
use App\Repositories\Module\Hosting\HostingRepositoryInterface as ModuleHostingRepositoryInterface;
use App\Repositories\Module\HostingServer\HostingServerCachedRepository;
use App\Repositories\Module\HostingServer\HostingServerRepositoryInterface;
use App\Repositories\Module\HostingAccount\HostingAccountCachedRepository;
use App\Repositories\Module\HostingAccount\HostingAccountRepositoryInterface;
use App\Repositories\Module\Vmware\VmwareCachedRepository;
use App\Repositories\Module\Vmware\VmwareRepositoryInterface;
use App\Repositories\DnsManager\Domain\DnsDomainRepository;
use App\Repositories\DnsManager\Domain\DnsDomainRepositoryInterface;
use App\Repositories\ActivityLog\ActivityLogRepository;
use App\Repositories\ActivityLog\ActivityLogRepositoryInterface;
use App\Repositories\DnsManager\Record\DnsRecordRepository;
use App\Repositories\DnsManager\Record\DnsRecordRepositoryInterface;
class RepositoryProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
//Addon
$this->app->singleton(AddonRepositoryInterface::class, AddonCachedRepository::class);
//Customer
$this->app->singleton(CustomerRepositoryInterface::class, CustomerCachedRepository::class);
//Customer
$this->app->singleton(CustomerCachedRepository::class);
//Domain
$this->app->singleton(DomainRepositoryInterface::class, DomainCachedRepository::class);
//Invoice
$this->app->singleton(InvoiceRepositoryInterface::class, InvoiceRepository::class);
//Invoice Attachment
$this->app->singleton(InvoiceAttachmentRepositoryInterface::class, InvoiceAttachmentRepository::class);
//Invoice Item
$this->app->singleton(InvoiceItemRepositoryInterface::class, InvoiceItemCachedRepository::class);
//Activity Log
$this->app->singleton(ActivityLogRepositoryInterface::class, ActivityLogRepository::class);
//Log
$this->app->singleton(LogRepositoryInterface::class, LogCachedRepository::class);
//Order
$this->app->singleton(OrderRepositoryInterface::class, OrderRepository::class);
// Payment
$this->app->singleton(PaymentReppositoryInterface::class, PaymentCachedReppository::class);
//Setting
$this->app->singleton(SettingRepositoryInterface::class, SettingCachedRepository::class);
//Staff
$this->app->singleton(StaffRepositoryInterface::class, StaffRepository::class);
//Ticket
$this->app->singleton(TicketRepositoryInterface::class, TicketCachedRepository::class);
//Ticket Reply
$this->app->singleton(TicketReplyRepositoryInterface::class, TicketReplyCachedRepository::class);
//Transaction
$this->app->singleton(TransactionRepositoryInterface::class, TransactionCachedRepository::class);
//Service
$this->app->singleton(ServiceRepositoryInterface::class, ServiceRepository::class);
// Module DnsServer
$this->app->singleton(DnsServerRepositoryInterface::class, DnsServerCachedRepository::class);
//Hosting
$this->app->singleton(ModuleHostingRepositoryInterface::class, ModuleHostingCachedRepository::class);
//Hosting Server
$this->app->singleton(HostingServerRepositoryInterface::class, HostingServerCachedRepository::class);
//Hosting Account
$this->app->singleton(HostingAccountRepositoryInterface::class, HostingAccountCachedRepository::class);
//vmware
$this->app->singleton(VmwareRepositoryInterface::class, VmwareCachedRepository::class);
// Product Category
$this->app->singleton(ProductCategoryRepositoryInterface::class, ProductCategoryRepository::class);
// Client API
$this->app->singleton(
\App\Repositories\Api\Client\ClientRepositoryInterface::class,
\App\Repositories\Api\Client\ClientRepository::class,
);
$this->app->singleton(
\App\Repositories\Api\Order\OrderRepositoryInterface::class,
\App\Repositories\Api\Order\OrderRepository::class,
);
$this->app->singleton(
\App\Repositories\Api\Invoice\InvoiceRepositoryInterface::class,
\App\Repositories\Api\Invoice\InvoiceRepository::class,
);
// Service API
$this->app->singleton(
\App\Repositories\Api\Service\ServiceRepositoryInterface::class,
\App\Repositories\Api\Service\ServiceRepository::class,
);
// Service Client API
$this->app->singleton(
\App\Repositories\Api\ServiceClient\ServiceClientRepositoryInterface::class,
\App\Repositories\Api\ServiceClient\ServiceClientRepository::class,
);
$this->app->singleton(
\App\Repositories\Module\Domain\DomainRepositoryInterface::class,
\App\Repositories\Module\Domain\DomainCachedRepository::class,
);
$this->app->singleton(
\App\Repositories\DnsManager\Server\DnsServerRepositoryInterface::class,
\App\Repositories\DnsManager\Server\DnsServerRepository::class,
);
$this->app->singleton(DnsDomainRepositoryInterface::class, DnsDomainRepository::class);
$this->app->singleton(DnsRecordRepositoryInterface::class, DnsRecordRepository::class);
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
}
}