<?php

declare(strict_types=1);

namespace Seka\Vzdelavanie\Http\Controllers\Backend\Testovanie;

use Seka\Vzdelavanie\Http\Controllers\Controller;
use Seka\Vzdelavanie\Models\Pouzivatel\Testovanie\Test;

/**
 * Class PouzivatelController
 *
 * @package Seka\Vzdelavanie\Http\Controllers\Backend\Testovanie
 */
final class PouzivatelController extends Controller
{
    /**
     * @return mixed
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function index()
    {
        $testy = Test::query()
            ->with('pouzivatel.pracovisko')
            ->orderByDesc('updated_at')
            ->paginate(100);

        return view('Vzdelavanie::pages.sprava.testovanie.pouzivatelia.index')
            ->withTesty($testy);
    }
}
