Skip to content

Commit

Permalink
Fix disabling of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarpsvo committed Jul 11, 2022
1 parent 769074b commit 089d23a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.0.7] - 11-07-2022

### Changed

- Fix disabling of resources/models not working

## [5.0.6] - 15-06-2022

### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/NPM.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ public static function getRegionModel(): string
// Resources
public static function getPageResource(): string
{
if (!static::getPageModel()) return null;
return config('nova-page-manager.page_resource', \Outl1ne\PageManager\Nova\Resources\Page::class);
}

public static function getRegionResource(): string
{
if (!static::getRegionModel()) return null;
return config('nova-page-manager.region_resource', \Outl1ne\PageManager\Nova\Resources\Region::class);
}

Expand Down
4 changes: 2 additions & 2 deletions src/NPMServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public function boot()
], 'config');

// Register resources
Nova::resources([
Nova::resources(array_filter([
NPM::getPageResource(),
NPM::getRegionResource(),
]);
]));

// Register commands
if ($this->app->runningInConsole()) {
Expand Down

0 comments on commit 089d23a

Please sign in to comment.