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

use Illuminate\Support\Facades\Route;

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

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

Route::domain($domain)
    ->prefix($path)
    ->middleware(['web', 'auth', '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');
    });
