Fork me on GitHub
The League of Extraordinary Packages

Our Packages:

Presented by The League of Extraordinary Packages

Getting Started

The Engine




While the actual syntax you use in your templates is entirely your choice (it’s just PHP after all), we suggest the following syntax guidelines to help keep templates clean and legible.


Syntax example

Here is an example of a template that complies with the above syntax rules.

<?php $this->layout('template', ['title' => 'User Profile']) ?>

<p>Hello <?=$this->e($name)?></p>

    <?php foreach($friends as $friend): ?>
            <a href="/profile/<?=$this->e($friend->id)?>">
    <?php endforeach ?>

<?php if ($invitations): ?>
    <p>You have some friend invites!</p>
<?php endif ?>