src/ChangeRecorderServiceProvider.php
public function boot()
    {
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');

        Router::macro('history', function ($name, $class) {
            $this->get($name.'/history', function () use ($class) {
                return Change::where('subject_type', $class);
            });
            $this->get("$name/{key}/history", function ($key) use ($class) {
                $field = (new $class)->getRouteKeyName() ?: 'id';

                return $class::where($field, $key)->firstOrFail()->getHistory();
            });
            $this->get("$name/{key}/collaborators", function ($key) use ($class) {
                $field = (new $class)->getRouteKeyName() ?: 'id';

                return $class::where($field, $key)->firstOrFail()->collaborators;
            });
        });
    }
public function boot()
    {
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');

        Router::macro('history', function ($name, $class) {
            $this->get($name.'/history', function () use ($class) {
                return Change::where('subject_type', $class);
            });
            $this->get("$name/{key}/history", function ($key) use ($class) {
                $field = (new $class)->getRouteKeyName() ?: 'id';

                return $class::where($field, $key)->firstOrFail()->getHistory();
            });
            $this->get("$name/{key}/collaborators", function ($key) use ($class) {
                $field = (new $class)->getRouteKeyName() ?: 'id';

                return $class::where($field, $key)->firstOrFail()->collaborators;
            });
        });
    }
Bootstrap any application services.

@return void