This PR adds 6 new methods to a brand new Nebula class in the root of the package. This class will act as the central source of truth for resources, dashboards and now pages.
Nebula::resources() - used to register an array of resources:
Nebula::resources([
ExampleResource::class,
]);
Nebula::availableResources() - used to retrieve the array of available / registered resources.
There are equivalent methods for dashboards and pages too. This will allow developers to manually register resources inside of a service providers boot method, and will also create a new place for more filtering based on permissions, etc in the future.
I've just pushed a change that will let users use either the fully-qualified name of the class, e.g. ExampleResource::class, during registration or provide an instance, new ExampleResource.
This PR adds 6 new methods to a brand new
Nebula
class in the root of the package. This class will act as the central source of truth for resources, dashboards and now pages.Nebula::resources()
- used to register an array of resources:Nebula::availableResources()
- used to retrieve the array of available / registered resources.There are equivalent methods for dashboards and pages too. This will allow developers to manually register resources inside of a service providers
boot
method, and will also create a new place for more filtering based on permissions, etc in the future.