<?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')
    ->namespace('Seka\Vzdelavanie\Http\Controllers')
    ->name('vzdelavanie.')
    ->group(function () {
        Route::prefix('sprava')->namespace('Backend')->middleware('permission:vzdelavanie')->name('sprava.')->group(function () {
            Route::get('/', 'SpravaController@index')->name('index');
        });
    }
);
