Last active
January 22, 2019 02:47
-
-
Save kvn1234/16c31778d473e705cb8fb9b43851622b to your computer and use it in GitHub Desktop.
Laravel RegEx for updating a form to show both old values while editing a form
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
(value\=\"\{\{\ old\(\')([a-z\-\_]+)(\')(\)\ \}\}\") | |
usage: $1$2$3\,\ \$variableObject\->$2$4 | |
works as long as: | |
$2 is the same key as the column name (or whatever is in the object coming back) | |
see https://regex101.com/r/DfQngW/1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment