<?php
/**
 * Created by PhpStorm.
 * User: radko
 * Date: 2018-12-13
 * Time: 10:00
 */

use Illuminate\Support\Facades\Route;

Route::prefix('/rest/vzdelavanie/kniznica/')
    ->middleware(
        'web',
        'permission:vzdelavanie|vzdelavanie_kniznica|vzdelavanie_kniznica.zobrazit'
    )
    ->namespace('Seka\Vzdelavanie\Http\Controllers\Api\Frontend\Kniznica')
    ->group(function () {
        Route::apiResource('vyhladavanie', 'VyhladavanieController')
            ->names([
                'index' => 'api.vzdelavanie.kniznica.vyhladavanie.index',
            ])
            ->only([
                'index',
            ]);

        Route::apiResource('oblubene', 'OblubeneController')
            ->parameters([
                'oblubene' => 'vzdPzvtlKnzncOblbnId',
            ])
            ->names([
                'store' => 'api.vzdelavanie.kniznica.oblubene.store',
                'destroy' => 'api.vzdelavanie.kniznica.oblubene.destroy',
            ])
            ->only([
                'store',
                'destroy',
            ]);
    }
);
