How to Show Old Value of Radio Button in Laravel
In this lesson, we will see how to show the old value of the radio button in Laravel, sometimes when working on a form that has a radio button and you submit the form if there are validation errors you want to keep the old value of the radio button, so let's see how we can do that.
Keep the old value of the radio button
So to show the old value of the radio button use the code below:
<div class="form-check">
<label class="form-check-label">
<input type="radio" class="form-check-input shadow-none" name="status" id="status" @checked(old('status')) value="1">
In Stock
<i class="input-helper"></i></label>
</div>