LaravelBA\RouteBinder\RouteBinderServiceProvider::boot PHP Method

boot() public method

public boot ( Router $router = null )
$router Illuminate\Routing\Router
    public function boot(Router $router = null)
    {
        $this->publishes([dirname(__DIR__) . '/config/routes.php' => $this->app->make('path.config') . '/routes.php'], 'config');
        $this->binders = $this->app->call([$this, 'makeBinders']);
        $this->app->call([$this, 'bind']);
        parent::boot($router);
    }

Usage Example

 public function test_it_should_call_all_binders()
 {
     $this->configMock->shouldReceive('get')->with('routes.binders', [])->andReturn(['foo', 'bar', 'baz']);
     $this->appMock->shouldReceive('routesAreCached')->andReturn(false);
     $this->expectBinders();
     $this->sp->boot($this->routerMock);
 }