diff --git a/app/Http/Middleware/Api/Client/SubstituteClientBindings.php b/app/Http/Middleware/Api/Client/SubstituteClientBindings.php index ea9099260..34e41d89b 100644 --- a/app/Http/Middleware/Api/Client/SubstituteClientBindings.php +++ b/app/Http/Middleware/Api/Client/SubstituteClientBindings.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware\Api\Client; -use Illuminate\Http\Request; use App\Models\Server; +use Closure; use Illuminate\Contracts\Routing\Registrar; use Illuminate\Routing\Middleware\SubstituteBindings; @@ -14,10 +14,9 @@ class SubstituteClientBindings extends SubstituteBindings parent::__construct($router); } - public function handle(Request $request, \Closure $next): mixed + public function handle($request, Closure $next): mixed { - // Override default behavior of the model binding to use a specific table - // column rather than the default 'id'. + // Override default behavior of the model binding to use a specific table column rather than the default 'id'. $this->router->bind('server', function ($value) { return $this->server->query()->where(strlen($value) === 8 ? 'uuidShort' : 'uuid', $value)->firstOrFail(); });