Skip to content

Commit d95f11f

Browse files
authored
Merge pull request #110 from aymanalhattami/main
feat: add the ability to show / hide token resource from config file
2 parents 43f19c4 + 3e9cd05 commit d95f11f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ return [
4848
'cluster' => null,
4949
'group' => 'User',
5050
'sort' => -1,
51-
'icon' => 'heroicon-o-key'
51+
'icon' => 'heroicon-o-key',
52+
'should_register_navigation' => false,
5253
]
5354
],
5455
'models' => [

config/api-service.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'group' => 'User',
88
'sort' => -1,
99
'icon' => 'heroicon-o-key',
10+
'should_register_navigation' => false,
1011
],
1112
],
1213
'models' => [

src/Resources/TokenResource.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ class TokenResource extends Resource
2828

2929
protected static bool $isScopedToTenant = false;
3030

31+
public static function shouldRegisterNavigation(): bool
32+
{
33+
return config('api-service.navigation.token.should_register_navigation', false);
34+
}
35+
3136
public static function form(Form $form): Form
3237
{
3338
return $form

0 commit comments

Comments
 (0)