|
7 | 7 |
|
8 | 8 | class Nova extends ServiceProvider
|
9 | 9 | {
|
10 |
| - protected $namespace = 'GeneaLabs\LaravelGovernor\Http\Controllers'; |
| 10 | + // protected $namespace = 'GeneaLabs\LaravelGovernor\Http\Controllers'; |
11 | 11 |
|
12 |
| - public function boot() |
13 |
| - { |
14 |
| - $this->loadViewsFrom(__DIR__.'/../../resources/views', 'genealabs-laravel-governor'); |
| 12 | + // public function boot() |
| 13 | + // { |
| 14 | + // $this->loadViewsFrom(__DIR__.'/../../resources/views', 'genealabs-laravel-governor'); |
15 | 15 |
|
16 |
| - $this->app->booted(function () { |
17 |
| - $this->routes(); |
18 |
| - }); |
| 16 | + // $this->app->booted(function () { |
| 17 | + // $this->routes(); |
| 18 | + // }); |
19 | 19 |
|
20 |
| - if (class_exists("Laravel\Nova\Resource")) { |
21 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorAction::$model = config("genealabs-laravel-governor.models.action"); |
22 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorAssignment::$model = config("genealabs-laravel-governor.models.assignment"); |
23 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorEntity::$model = config("genealabs-laravel-governor.models.entity"); |
24 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorGroup::$model = config("genealabs-laravel-governor.models.group"); |
25 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorOwnership::$model = config("genealabs-laravel-governor.models.ownership"); |
26 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorPermission::$model = config("genealabs-laravel-governor.models.permission"); |
27 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorRole::$model = config("genealabs-laravel-governor.models.role"); |
28 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorTeam::$model = config("genealabs-laravel-governor.models.team"); |
29 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorTeamInvitation::$model = config("genealabs-laravel-governor.models.invitation"); |
30 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorUser::$model = config("genealabs-laravel-governor.models.auth"); |
31 |
| - \Laravel\Nova\Nova::serving(function (ServingNova $event) { |
32 |
| - \Laravel\Nova\Nova::script('genealabs-laravel-governor', __DIR__ . '/../../dist/js/tool.js'); |
33 |
| - \Laravel\Nova\Nova::style('genealabs-laravel-governor', __DIR__ . '/../../dist/css/tool.css'); |
34 |
| - \Laravel\Nova\Nova::resources([ |
35 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorAction::class, |
36 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorAssignment::class, |
37 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorEntity::class, |
38 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorGroup::class, |
39 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorOwnership::class, |
40 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorPermission::class, |
41 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorRole::class, |
42 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorUser::class, |
43 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorTeam::class, |
44 |
| - \GeneaLabs\LaravelGovernor\Nova\GovernorTeamInvitation::class, |
45 |
| - ]); |
46 |
| - }); |
47 |
| - } |
48 |
| - } |
| 20 | + // if (class_exists("Laravel\Nova\Resource")) { |
| 21 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorAction::$model = config("genealabs-laravel-governor.models.action"); |
| 22 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorAssignment::$model = config("genealabs-laravel-governor.models.assignment"); |
| 23 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorEntity::$model = config("genealabs-laravel-governor.models.entity"); |
| 24 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorGroup::$model = config("genealabs-laravel-governor.models.group"); |
| 25 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorOwnership::$model = config("genealabs-laravel-governor.models.ownership"); |
| 26 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorPermission::$model = config("genealabs-laravel-governor.models.permission"); |
| 27 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorRole::$model = config("genealabs-laravel-governor.models.role"); |
| 28 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorTeam::$model = config("genealabs-laravel-governor.models.team"); |
| 29 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorTeamInvitation::$model = config("genealabs-laravel-governor.models.invitation"); |
| 30 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorUser::$model = config("genealabs-laravel-governor.models.auth"); |
| 31 | + // \Laravel\Nova\Nova::serving(function (ServingNova $event) { |
| 32 | + // \Laravel\Nova\Nova::script('genealabs-laravel-governor', __DIR__ . '/../../dist/js/tool.js'); |
| 33 | + // \Laravel\Nova\Nova::style('genealabs-laravel-governor', __DIR__ . '/../../dist/css/tool.css'); |
| 34 | + // \Laravel\Nova\Nova::resources([ |
| 35 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorAction::class, |
| 36 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorAssignment::class, |
| 37 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorEntity::class, |
| 38 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorGroup::class, |
| 39 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorOwnership::class, |
| 40 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorPermission::class, |
| 41 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorRole::class, |
| 42 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorUser::class, |
| 43 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorTeam::class, |
| 44 | + // \GeneaLabs\LaravelGovernor\Nova\GovernorTeamInvitation::class, |
| 45 | + // ]); |
| 46 | + // }); |
| 47 | + // } |
| 48 | + // } |
49 | 49 |
|
50 |
| - protected function routes() |
51 |
| - { |
52 |
| - if ($this->app->routesAreCached()) { |
53 |
| - return; |
54 |
| - } |
| 50 | + // protected function routes() |
| 51 | + // { |
| 52 | + // if ($this->app->routesAreCached()) { |
| 53 | + // return; |
| 54 | + // } |
55 | 55 |
|
56 |
| - Route::middleware(['nova', Authorize::class]) |
57 |
| - ->prefix("genealabs/laravel-governor/nova") |
58 |
| - ->namespace($this->namespace . "\Nova") |
59 |
| - ->group(__DIR__ . '/../../routes/nova.php'); |
60 |
| - } |
| 56 | + // Route::middleware(['nova', Authorize::class]) |
| 57 | + // ->prefix("genealabs/laravel-governor/nova") |
| 58 | + // ->namespace($this->namespace . "\Nova") |
| 59 | + // ->group(__DIR__ . '/../../routes/nova.php'); |
| 60 | + // } |
61 | 61 |
|
62 |
| - public function register() |
63 |
| - { |
64 |
| - // |
65 |
| - } |
| 62 | + // public function register() |
| 63 | + // { |
| 64 | + // // |
| 65 | + // } |
66 | 66 | }
|
0 commit comments