forPage($page, $perPage), $total ?: $this->count(), $perPage, $page, [ 'path' => LengthAwarePaginator::resolveCurrentPath(), 'pageName' => $pageName, ] ); }); // Configure JWT builder $this->app->bind('Lcobucci\JWT\Configuration', function () { $key = InMemory::plainText(config('app.key')); $config = Configuration::forSymmetricSigner(new Sha256, $key); $config->setValidationConstraints(new SignedWith(new Sha256, $key)); return $config; }); // Configure HtmlSanitizer $this->app->bind(HtmlSanitizer::class, function () { return new HtmlSanitizer( (new HtmlSanitizerConfig) ->allowSafeElements() ->forceAttribute('a', 'rel', 'noopener nofollow') ); }); // Turn on Eloquent strict mode when developing Model::shouldBeStrict(! $this->app->isProduction()); // Force HTTPS URL generation in production URL::forceHttps($this->app->isProduction()); } }