29.07.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Service Providers 119<br />

The Register Method<br />

As mentioned previously, within the register method, you should only bind things into the service<br />

container. You should never attempt to register any event listeners, routes, or any other piece of<br />

functionality within the register method. Otherwise, you may accidently use a service that is<br />

provided by a service provider which has not loaded yet.<br />

Now, let’s take a look at a basic service provider:<br />

.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!