<?php
/**
 * Created by PhpStorm.
 * User: radko
 * Date: 13.11.18
 * Time: 8:11
 */

if ($domain = config('vzdelavanie.subdomena')) {
    $domain = sprintf(
        '%s.%s',
        $domain,
        config('app.domain')
    );
}

$path = config('vzdelavanie.cesta');

Route::domain($domain)
    ->prefix($path)
    ->middleware('web')
    ->middleware('permission:vzdelavanie|vzdelavanie_kniznica|vzdelavanie_kniznica.zobrazit')
    ->namespace('Seka\Vzdelavanie\Http\Controllers\Frontend')
    ->name('vzdelavanie.')
    ->group(function () {
        Route::get('/', 'VzdelavanieController@index')->name('index');
        Route::get('/klient', 'KlientAppController@show')->name('klient');
    }
);
