Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

old function use in checkbox selected in laravel blade

// old selected checkbox in blade template using old function
<label class="form-check-inline">
    <input class="form-check-input" type="checkbox" name="hobby[]" value="1" 
	{{ (is_array(old('hobby')) && in_array(1, old('hobby'))) ? ' checked' : '' }}> football
</label>
//@sujay
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function #checkbox #selected #laravel #blade
ADD COMMENT
Topic
Name
1+8 =