06.10.2016 Views

laravel-5

Create successful ePaper yourself

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

HTTP Controllers 145<br />

20 }<br />

21 }<br />

If your controller method is also expecting input from a route parameter, simply list your route<br />

arguments after your other dependencies. For example, if your route is defined like so:<br />

1 Route::put('user/{id}', 'UserController@update');<br />

You may still type-hint the Illuminate\Http\Request and access your route parameter id by<br />

defining your controller method like the following:<br />

1

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

Saved successfully!

Ooh no, something went wrong!