So, I've looked through every possible documentation and forum thread on service providers and facades and still can't get this to work...
I have a service and a provider:
class AddressFinderServiceProvider extends ServiceProvider
protected $defer = true;
public function register()
return new AddressFinder('idealpostcodes');
And a facade for it:
class AddressFinderFacade extends Facade
protected static function getFacadeAccessor()
Now when I try to use
AddressFinder::find($postcode); I'm getting
ReflectionException in Container.php line 736:
Class address_finder does not exist
Both the service provider and facade are properly registered in app.php.
If I pass the full class name in getFacadeAccessor() only then it works. As if the facade doesn't even try to resolve it from the service container.