0
我試圖創建在我AppServiceProvider新刀片指令:Laravel刀片compileString給了我一個空白頁
<?php
public function boot()
{
Blade::directive('test', function() {
return Blade::compileString('@if(1==1) test @endif');
});
}
然後調用這個指令在我看來:
@test()
但它的不工作,給我一個空白頁。