I need to create a custom blade directive like @error like this:
@error('title')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
what i want to do is to 2 vars like message that i can access within the directive scope only
i used, but both didn't work:
Blade::if('test', function($text){
echo '<?php $v1 = "this is ok";?>';
View::share('v2', "test2");
return true;
});