sarga/packages/Sarga/API/Http/Controllers/Channels.php

24 lines
568 B
PHP
Raw Normal View History

2021-10-27 16:06:17 +00:00
<?php namespace Sarga\API\Http\Controllers;
use Webkul\API\Http\Controllers\Shop\Controller;
use Sarga\API\Http\Resources\Core\Channel;
use Sarga\Shop\Repositories\ChannelRepository;
class Channels extends Controller
{
2022-04-06 06:52:42 +00:00
public function __construct(protected ChannelRepository $channelRepository)
2021-10-27 16:06:17 +00:00
{
}
public function index()
{
2022-11-02 06:29:18 +00:00
return Channel::make($this->channelRepository->first());
2021-10-27 16:06:17 +00:00
}
public function get($channel_id){
2021-11-09 17:55:21 +00:00
$this->categoryRepository->getCategoryTreeWithoutDescendant(request()->input('parent_id'));
2021-10-27 16:06:17 +00:00
}
}