don47/blade

This package is abandoned and no longer maintained. No replacement package was suggested.

Blade for modulusPHP

Maintainers

Details

github.com/Donaldp/blade

Source

Issues

Installs: 57

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Type:package

1.0 2018-06-08 10:14 UTC

This package is not auto-updated.

Last update: 2020-08-14 21:25:26 UTC


README

Blade for modulusPHP

Installing

composer require don47/blade

Setting up

Open app\Config\grammar.php and add the following code inside return

'don47-blade' => [
  'enabled' => true,
  'class' => Don47\Grammar\Blade::class
]

Your app\Config\grammar.php file should now look like this:

<?php

return [

  'don47-blade' => [
    'enabled' => true,
    'class' => Don47\Grammar\Blade::class
  ]

];

Examples

if statement

@if ($name == 'Donald')
  <h1>Creator of modulusPHP</h1>
@endif

isset

@isset($creator)
  <h1>The creator of modulusPHP is {{ $creator }}</h1>
@endisset

equivalent to:

<?php if (isset($creator)) : ?>
  <h1>The creator of modulusPHP is <?php echo $creator; ?></h1>
<?php endif ; ?>