protected function registerRepositoryInterfaces()
    {
        $this->app->bind('Artesaos\Defender\Contracts\Permission', function ($app) {
            return $app->make($this->app['config']->get('defender.permission_model'));
        });
        $this->app->bind('Artesaos\Defender\Contracts\Role', function ($app) {
            return $app->make($this->app['config']->get('defender.role_model'));
        });

        $this->app->singleton('defender.role', function ($app) {
            return new EloquentRoleRepository($app, $app->make(\Artesaos\Defender\Contracts\Role::class));
        });

        $this->app->singleton('Artesaos\Defender\Contracts\Repositories\RoleRepository', function ($app) {
            return $app['defender.role'];
        });

        $this->app->singleton('defender.permission', function ($app) {
            return new EloquentPermissionRepository($app, $app->make(\Artesaos\Defender\Contracts\Permission::class));
        });

        $this->app->singleton('Artesaos\Defender\Contracts\Repositories\PermissionRepository', function ($app) {
            return $app['defender.permission'];
        });

        $this->app->singleton('defender.user', function ($app) {
            $userModel = $app['config']->get('defender.user_model');

            return new EloquentUserRepository($app, $app->make($userModel));
        });

        $this->app->singleton('Artesaos\Defender\Contracts\Repositories\UserRepository', function ($app) {
            return $app['defender.user'];
        });
    }