I’d like to require an external service provider (in my case mtownsend/read-time).
composer require mtownsend/read-time, I added the service provider to config/app :
'providers' => [ App\Providers\ThemeServiceProvider::class, Mtownsend\ReadTime\Providers\ReadTimeServiceProvider::class, ],
I get the following error:
Call to undefined function Mtownsend\ReadTime\Providers\config_path()
The package uses
Illuminate\Support\ServiceProvider\config_path function, while I’d like it to use
If I change the used namespace and call
\Roots\config_path('read-time.php') instead of
config_path('read-time.php') in the packages files it works, but I guess it’s not the right way to do.
What would be the best practice in this case ? Is there a way to “override” a namespace a package is using ?