refactor: remove unused Type components and relocate module-related API routes to admin routes.

This commit is contained in:
pbao9
2026-02-13 12:03:11 +07:00
parent 245f5ade37
commit 3a10c3e2d7
12 changed files with 27 additions and 1552 deletions
@@ -16,14 +16,12 @@ use App\Repositories\Addon\AddonRepositoryInterface;
use App\Repositories\Domain\DomainRepositoryInterface;
use App\Repositories\Group\GroupRepositoryInterface;
use App\Repositories\Hosting\HostingRepositoryInterface;
use App\Repositories\Type\TypeRepositoryInterface;
use App\Repositories\VPS\VPSRepositoryInterface;
use Illuminate\Http\Request;
class ShopController extends Controller
{
public function __construct(
public TypeRepositoryInterface $typeRepository,
public GroupRepositoryInterface $groupRepository,
public VPSRepositoryInterface $vpsRepository,
public HostingRepositoryInterface $hostingRepository,
-2
View File
@@ -88,8 +88,6 @@ use App\Repositories\Module\Snapshot\SnapshotLimitRepositoryInterface;
use App\Repositories\Module\Snapshot\SnapshotRepositoryInterface;
use App\Repositories\Module\Vmware\VmwareCachedRepository;
use App\Repositories\Module\Vmware\VmwareRepositoryInterface;
use App\Repositories\Type\TypeCachedRepository;
use App\Repositories\Type\TypeRepositoryInterface;
use App\Repositories\Admin\Product\ProductRepository;
use App\Repositories\Admin\Product\ProductRepositoryInterface;
use App\Repositories\User\UserCachedRepository;
+2 -3
View File
@@ -2,7 +2,6 @@
namespace App\View\Components\Order;
use App\Repositories\Type\TypeRepositoryInterface;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
@@ -13,7 +12,7 @@ class Type extends Component
* Create a new component instance.
*/
public function __construct(
public TypeRepositoryInterface $typeRepository
// public TypeRepositoryInterface $typeRepository
)
{
//
@@ -24,7 +23,7 @@ class Type extends Component
*/
public function render(): View|Closure|string
{
$types= $this->typeRepository->getAll();
$types = null;
return view('components.order.type',compact('types'));
}
}
-31
View File
@@ -1,31 +0,0 @@
<?php
namespace App\View\Components;
use App\Repositories\Type\TypeRepositoryInterface;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Type extends Component
{
/**
* Create a new component instance.
*/
public function __construct(
public $model = null,
public TypeRepositoryInterface $typeRepository
)
{
//
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
$types = $this->typeRepository->getAll();
return view('components.type',compact('types'));
}
}