Reputation: 1201
I created From Request Validation in my controller here all sets fine and working but when error comes then i want to print the request data in the view.blade.php with
Request::all()
this return empty []
Although i want all the form data into it.
Please Assist
Thanks
My contoller's Method code to store data looks like
/**
* Store non capital expense
*
* @return null
* @param $request store expense
*/
public function store(StoreExpense $request)
{
$request->flash();
AND Create method
/**
* non-capital expenses
*
* @return null
* @param crops Get the all crops
*/
public function create(Crops $crops)
{
Upvotes: 1
Views: 96
Reputation: 66
Laravel has old() helper to retrieving "Old" input. For example
<input type="text" name="username" value="{{ old('username') }}">
This method helps you to print previous request input values if validation failed.
Upvotes: 1