ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.149.249.63 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/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ |
Upload File : |
<?php namespace Illuminate\Foundation\Http\Middleware; use Closure; use Illuminate\Contracts\Auth\Access\Gate; class Authorize { /** * The gate instance. * * @var \Illuminate\Contracts\Auth\Access\Gate */ protected $gate; /** * Create a new middleware instance. * * @param \Illuminate\Contracts\Auth\Access\Gate $gate * @return void */ public function __construct(Gate $gate) { $this->gate = $gate; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string $ability * @param string|null $model * @return mixed * * @throws \Illuminate\Auth\Access\AuthorizationException */ public function handle($request, Closure $next, $ability, $model = null) { $this->gate->authorize($ability, $this->getGateArguments($request, $model)); return $next($request); } /** * Get the arguments parameter for the gate. * * @param \Illuminate\Http\Request $request * @param string|null $model * @return array|string|\Illuminate\Database\Eloquent\Model */ protected function getGateArguments($request, $model) { // If there's no model, we'll pass an empty array to the gate. If it // looks like a FQCN of a model, we'll send it to the gate as is. // Otherwise, we'll resolve the Eloquent model from the route. if (is_null($model)) { return []; } if (strpos($model, '\\') !== false) { return $model; } return $request->route($model); } }