Tutorial by Examples

php artisan make:request StoreUserRequest php artisan make:request UpdateUserRequest Note: You can also consider using names like StoreUser or UpdateUser (without Request appendix) since your FormRequests are placed in folder app/Http/Requests/.
Lets say continue with User example (you may have controller with store method and update method). To use FormRequests you use type-hinting the specific request. ... public function store(App\Http\Requests\StoreRequest $request, App\User $user) { //by type-hinting the request class, Larave...
Sometimes you may want to have some login to determine where the user gets redirected to after submitting a form. Form Requests give a variety of ways. By default there are 3 variables declared in the Request $redirect, $redirectRoute and $redirectAction. On top of those 3 variables you can overr...

Page 1 of 1