Skip to content

Commit a094336

Browse files
author
u.aleroev
committed
fix: gate won't authorizable
1 parent 843f54e commit a094336

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SwaggerUI.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace YSRoot\SwaggerUI;
44

55
use Closure;
6+
use Illuminate\Contracts\Auth\Access\Authorizable;
67
use Illuminate\Http\Request;
78
use Illuminate\Routing\Router;
89
use Illuminate\Support\Facades\Route;
@@ -27,7 +28,7 @@ public static function routes(?callable $callback = null, array $options = []):
2728

2829
public static function gate(): Closure
2930
{
30-
return static::$gateCallback ?? function (Request $request) {
31+
return static::$gateCallback ?? function (?Authorizable $authorizable, Request $request) {
3132
return true;
3233
};
3334
}

0 commit comments

Comments
 (0)