I want to add the following code to my laravel project to support the break and continue statements in blade.
以下是代码:
Blade::extend(function($value)
{
return preg_replace('/(\s*)@(break|continue)(\s*)/', '$1<?php $2; ?>$3', $value);
});
I have no idea however where to place it, any help would be appreciated?