Created
December 27, 2014 18:34
-
-
Save lukearmstrong/6487b08dfd64aee90ee8 to your computer and use it in GitHub Desktop.
Is there a better way of setting the value of a field on a form shared with create/edit views using Laravel 5?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" name="forename" class="form-control" id="forename" value="{{ ! is_null(old('forename')) ? old('forename') : (isset($model->forename) ? $model->forename : '') }}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment