06.10.2016 Views

laravel-5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HTTP Controllers<br />

• Introduction<br />

• Basic Controllers<br />

• Controller Middleware<br />

• RESTful Resource Controllers A> - Partial Resource Routes A> - Naming Resource Routes A><br />

- Naming Resource Route Parameters A> - Supplementing Resource Controllers<br />

• Dependency Injection & Controllers<br />

• Route Caching<br />

Introduction<br />

Instead of defining all of your request handling logic in a single routes.php file, you may wish<br />

to organize this behavior using Controller classes. Controllers can group related HTTP request<br />

handling logic into a class. Controllers are stored in the app/Http/Controllers directory.<br />

Basic Controllers<br />

Here is an example of a basic controller class. All Laravel controllers should extend the base<br />

controller class included with the default Laravel installation:<br />

1

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

Saved successfully!

Ooh no, something went wrong!