Created
February 1, 2016 13:56
-
-
Save vinicius73/08991f6c3854e7856d47 to your computer and use it in GitHub Desktop.
blade var
This file contains hidden or 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
protected function compileVar($expression) | |
{ | |
return preg_replace('/\(\'(.*?)\'\,\s*(.*)\)/', '<?php $$1 = $2; ?>', $expression); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment