Reputation: 17
i am using this code but i am not working old function
i have used both using this <?php echo old('title'); ?>
AND {{ old('title') }}
Both are not working
<form action="<?php echo route('post.create') ?>" method="GET">
@csrf
<input type="text" name="title" value="<?php echo old('title'); ?>"></br>
<textarea name="contant" id="" cols="30" rows="10"><?php echo old('contant'); ?></textarea>
Upvotes: 0
Views: 174
Reputation: 155
If you want to use GET method use request helper function instead of old.
If you use POST method and stil not working. There are few solutions.
Use withInput()
to go back with data
return back()->withInput()->withErrors('Add atleast one image in the post.');
Not sure if you remember but i raised a thread the other day where i was having cache problems with Chrome. That might make sense. I tried Canary and same issue so perhaps it's chrome (if that's what OP is using) Please see this posts. Laracasts Ref
Upvotes: 0