Remove Blade from sage 9

Is there a way to complete remove Laravel’s Blade?

We do not like working with blade and we want to remove it from the theme. Must we have to do this manually or is there a way to disable blade?

1 Like

Just rename your .blade.php files to .php, and Blade will process them as normal PHP files. That should probably get you the results you want.

If you want it completely removed, you’ll have to do it manually. Remove the whole chunk of blade stuff from setup.php and remove template hierarchy and template include stuff from filters.php.

1 Like

Thanks, I thought. I’m going to present blade at the office maybe we change. It looks nice !

I’m also very interested in using Sage 9 and all of it’s awesome features like webpack and ES6…but without using Blade templates. In trying to do so (by simply removing the .blade extension) it seems I lose out on a very key Sage feature–the theme wrapper. That’s enough of a loss that upgrading may not be worth it.

Just embracing Blade templating and moving on seems like a fair option, except that I work with other developers and asking all of them (and especially jr devs) to learn Blade templating too feels like an unreasonable ask of me when it’s such a deviation from the world of WordPress theming. Also, I’ve been scanning the comments related to Blade templates and Sage 9, and I noticed that people are having issues with it working on WPEngine’s hosting platform. That too is a big deal for us as we host many sites with them.

Any chance we can add back in the theme wrapper for those of us who aren’t ready for Blade?

1 Like

I’m trying to get the memberpress plugin to play friendly with sage 9. I believe the problem I’m having may have to do with blade, which I would love to use. However, I’d like to try removing blade to see if I can get memberpress to work. I’ve read a few posts about how to remove blade, but it’s not clear. I’ve tried a few things. Can someone point me to a good explanation of how I can do this? Will I be able to keep the nice folder structure of 9? My other option I’m considering is just using Sage 8, which works, but I wouldn’t get the new and improved Sage 9 front-end workflow. Tips? Advice?

These are my 3 options:

  1. figure out how to make memberpress work with blade (almost given up on this)
  2. remove blade but still use Sage 9
  3. use Sage 8 and try not to obsess about not using the cool, new front-end workflow of Sage 9

FWIW you can use Sage 9 and still have all your PHP logic in your templates as usual. It’s what I’m currently doing just to get up to speed in the environment. I’ll take advantage of the Controllers later once I can get up to speed.

2 Likes

Hey @isaiahmg , were you able to find a solution to this? I’m in the same situation: Not being able to use Sage on WPEngine, as it give a blank screen because of not being able to handle the compiled/hashed PHP scripts in the views/cache folder. Do you have something?