refactor: remove unused Type components and relocate module-related API routes to admin routes.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user