Skip to content

Commit 1000b2d

Browse files
authored
Update gate definition to type-hint User model (#1677)
1 parent e468f2e commit 1000b2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stubs/TelescopeServiceProvider.stub

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Providers;
44

5+
use App\Models\User;
56
use Illuminate\Support\Facades\Gate;
67
use Laravel\Telescope\IncomingEntry;
78
use Laravel\Telescope\Telescope;
@@ -55,7 +56,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
5556
*/
5657
protected function gate(): void
5758
{
58-
Gate::define('viewTelescope', function ($user) {
59+
Gate::define('viewTelescope', function (User $user) {
5960
return in_array($user->email, [
6061
//
6162
]);

0 commit comments

Comments
 (0)