Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Simple View Engine

Simple View Engine Laravel Package

crodas/simple-view-engine

A simple, fast PHP view engine with a lightweight template syntax. It compiles templates to plain PHP for speed, supports template inheritance and output escaping, and drops into existing PHP projects without heavy dependencies or framework lock-in.

View on GitHub
Deep Wiki
Context7

Simple View engine designed to generate code. Based on Laravel's 4 Blade.

Frequently asked questions about Simple View Engine
Is crodas/simple-view-engine compatible with Laravel 8, 9, 10, or 11?
Not in the modern sense. SimpleView is a standalone extraction of Laravel 4's Blade compiler, so it ships no service provider, no facade, no container bindings, and no integration with Illuminate\View. It will install via Composer alongside a modern Laravel app, but you would be running a second parallel rendering path rather than extending the framework's view layer. For Laravel 8 and above, invoking the maintained BladeCompiler standalone from illuminate/view is the lower-risk option.
How do I install crodas/simple-view-engine with Composer?
Run composer require crodas/simple-view-engine, or better composer require --dev crodas/simple-view-engine because the package is a build-time code generator rather than a runtime dependency. There is no Laravel package auto-discovery, so nothing registers itself in your application. Because the codebase dates to the PHP 5.3 and 5.4 era, expect to patch pre-PSR-4 conventions and dynamic property usage before it autoloads cleanly on PHP 8.x.
Why is my generated code HTML-encoded when using SimpleView?
SimpleView inherits Laravel 4 Blade's escaping semantics, where double braces HTML-escape output and triple braces emit raw output. Code generation almost always wants raw output, so a template author with modern-Blade muscle memory will silently turn angle brackets, ampersands, and quotes into entities and corrupt the generated file. Write raw-emitting templates with triple braces and validate the behavior in a spike before committing to the package.
Can I use SimpleView to generate models, migrations, DTOs, or config scaffolding?
Yes, that is the one use case where it fits well. It compiles a lightweight Blade-style dialect to plain PHP, so you can write generators for models, migrations, DTOs, or config files with syntax any Laravel developer already reads. Keep it isolated behind an internal CodeGenerator interface and invoke it from an artisan make-style command or a CI generation step, never from a runtime request path.
What is the difference between SimpleView and Laravel Blade?
SimpleView is a stripped-out copy of the Laravel 4 Blade compiler repurposed from HTML rendering to code generation. You get the familiar extends, section, yield, and core directives, but none of the features added in later Laravel releases such as components, slots, or newer directives. Escaping follows the old convention of double braces for escaped output and triple braces for raw output, whereas modern Blade uses the exclamation-mark syntax for raw output.
Does crodas/simple-view-engine work on PHP 8?
Almost certainly not out of the box. The package was written for PHP 5.3 and 5.4, has no type declarations, and uses patterns such as dynamic properties and old each-style iteration that are deprecated or removed in PHP 8. Plan on a fork with small compatibility patches, and treat any successful autoload on PHP 8.x as something to prove with a spike rather than assume.
What are the best alternatives to SimpleView for PHP code generation?
The closest maintained substitute is Laravel's own Blade compiler used standalone, wired up with Container, Filesystem, EngineResolver, and BladeCompiler from illuminate/view, which supports PHP 8 and is already in your dependency tree. If you need syntax-safe output rather than string templating, nette/php-generator builds an AST and guarantees valid PHP. For simple cases, plain stub substitution with str_replace or sprintf is often enough.
Is crodas/simple-view-engine maintained, and is it safe to use in production?
Treat it as abandoned rather than malicious. It has five stars, zero dependents, and no release in years, which means no upstream patches, no CVE response, and no PHP-version compatibility work. Supply-chain risk is low because nobody is actively changing it, but the bus factor is total, so the practical question is who owns your fork. The MIT-family license makes forking legally clean.
Does SimpleView support template inheritance, sections, and Blade directives?
Yes, it inherits Laravel 4 Blade's inheritance model, so extends, section, yield, and the core directives all work as a Laravel developer would expect. That familiarity is its main selling point: authoring a new generator template requires no new syntax training. It does not support modern Blade features added after Laravel 4, so do not port templates that rely on components or newer directives.
How should I run SimpleView in CI and manage its compiled template cache?
SimpleView writes compiled templates to its own cache directory, separate from Laravel's, so make sure the path is writable, clear it between CI runs, and watch for races when tests run in parallel. Compiled artifacts are build output, so keep them out of version control and regenerate them deterministically. Also keep the generated whitespace and indentation stable, because non-deterministic output pollutes diffs and makes reviews noisy.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections