It is discouraged to do in a view so there is no blade tag for it. If you do want to do this in your blade view, you can either just open a php tag as you wrote it or register a new blade tag. Just an example:
<?php /** * <code> * {? $old_section = "whatever" ?} * </code> */ Blade::extend(function($value) { return preg_replace('/\{\?(.+)\?\}/', '<?php ${1} ?>', $value);});
By:Xtreem Solution
I want block blade for security reasons, because I have a pages manager and some users can change the blade, but when you write @env("DB_PASSWORD") to blade, everyone get DB password.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community