At Spatie, we’re building a multi-tenant app. Seb figured out a great way to handle theme based views.
Laravel allows you register a view vendor namespace which points to a specific directory containing Blade files. This feature is intended for package development, but it’s a perfect solution to our problem.
By registering a namespace with the current theme’s location, we can drop all the dynamic parts of our view names when we’re calling them.