3 months ago

Blade directive's not working

Posted 3 months ago by Wouter_Veen

I have upgraded my project from 5.7 to 5.8 and now mu custom directives don't work. So I got some custom Blade Directives for Ziggy. I have made these directive in a seperate ServiceProvider like so

    public function boot()
        \Blade::directive('routes', function($group = null){
            return "<?php echo app('" . BladeRouteGenerator::class . "')->generate({$group}); ?>";

And in the blade.php file I call this like:


But the blade just returnes this like plain text and not like the routes it should give. Nou I have tried this in a new project and there it works. In Laravel 5.7 it worked and now when i upgrade to 5.8 it stoped working.

And when I use standaard directives like:


It wil print True like expected, so only the custom directives are not working.

Does somebody has the same issue or has a solution to this issue?

UPDATE So apparently the problem lies in a package I used htmlmin link of issue , after deleting this package everything is working like it should be.

Please sign in or create an account to participate in this conversation.