Created
October 8, 2014 20:01
-
-
Save kirkbushell/0a7477ad371b285554b9 to your computer and use it in GitHub Desktop.
Deferred service provider overloading other deferred provider objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ValidationServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Indicates if loading of the provider is deferred. | |
* | |
* @var bool | |
*/ | |
protected $defer = true; | |
public function register() | |
{ | |
$closure = function() { | |
$this->app['validator']->setPresenceVerifier(new DoctrinePresenceVerifier); | |
}; | |
$closure->bindTo($this); | |
$this->app['events']->listen('Illuminate\Validation\ValidationServiceProvider', $closure); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment