Skip to content

Instantly share code, notes, and snippets.

@asaelx
Created February 1, 2016 08:51
Show Gist options
  • Save asaelx/8040405b09128cdc089b to your computer and use it in GitHub Desktop.
Save asaelx/8040405b09128cdc089b to your computer and use it in GitHub Desktop.
Blade::extend(function($value) {
return preg_replace('/\@set(.+)/', '<?php ${1} ?>', $value);
});
// Example
// @set $var = 'foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment