App\Http\Controllers\Backend\NewsCategoryController::index PHP Méthode

index() public méthode

Display a listing of the resource.
public index ( ) : Response
Résultat 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]]);
    }