<?php
namespace Root\Core\Provider;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Route;

class CoreServiceProvider extends ServiceProvider
{
    public function register()
    {
        
    }

    public function boot()
    {
        $router = $this->app['router'];

        $router->aliasMiddleware('RequireUser', \Root\Core\Middleware\RequireUser::class);
        $router->aliasMiddleware('OptionalUser', \Root\Core\Middleware\OptionalUser::class);
        $router->aliasMiddleware('CheckInternalApiKey', \Root\Core\Middleware\CheckInternalApiKey::class);

        $this->publishes([
            __DIR__ . '/../Config/core.php' => config_path('core.php'),
        ], 'core-config');

    }
}
