Service Provider
Laravel Service Provider
Categories:
Access Service Provider Directly
You can access a Service Provider directly by using the app()
// Get an instance of the MyServiceProvider
$myServiceProvider = app(MyServiceProvider::class);
// call a method on the provider
$myServiceProvider->someMethod();