<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Http\Controllers\Backend;

use Seka\Portal\Modul\Statistiky\Entities\Import\Import;
use Seka\Portal\Modul\Statistiky\Http\Controllers\Controller;

/**
 * ImportyController
 *
 * @package Seka\Portal\Modul\Statistiky\Http\Controllers\Backend
 */
final class ImportyController extends Controller
{
    /**
     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Foundation\Application|\Illuminate\View\View
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function index()
    {
        $importy = Import::query()->orderByDesc('datum_cas_akcie')->paginate();

        return view('Statistiky::backend.pages.importy.index', compact('importy'));
    }
}
