Clockwork\Support\Lumen\ClockworkServiceProvider::boot PHP Method

boot() public method

public boot ( )
    public function boot()
    {
        if ($this->isRunningWithFacades() && !class_exists('Clockwork')) {
            class_alias('Clockwork\\Support\\Lumen\\Facade', 'Clockwork');
        }
        if (!$this->app['clockwork.support']->isCollectingData()) {
            return;
            // Don't bother registering event listeners as we are not collecting data
        }
        if ($this->app['clockwork.support']->isCollectingDatabaseQueries()) {
            $this->app['clockwork.eloquent']->listenToEvents();
        }
        if ($this->app['clockwork.support']->isCollectingEmails()) {
            $this->app->make('clockwork.swift');
        }
        if (!$this->app['clockwork.support']->isEnabled()) {
            return;
            // Clockwork is disabled, don't register the route
        }
        $this->app->get('/__clockwork/{id}', 'Clockwork\\Support\\Lumen\\Controller@getData');
    }