App\Http\Controllers\Backend\NewsCategoryController::index PHP Method

index() public method

Display a listing of the resource.
public index ( ) : Response
return Response
    public function index()
    {
        $categories = $this->repository->orderBy('id', 'desc')->paginate(15);
        $selectedCategory = CategoryService::unlimitedForLevel($categories->toArray()['data']);
        return view('backend.news.category', ['categories' => $categories, 'selectCategory' => $selectedCategory, 'category' => ['id' => 0, 'name' => '', 'pid' => 0, 'html' => '', 'level' => 0]]);
    }