PHPackages                             escolalms/templates - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. escolalms/templates

ActivePackage[Templating &amp; Views](/categories/templating)

escolalms/templates
===================

Escola Headless LMS templates (for eg Certificates)

0.2.37(3y ago)0102.2k↑600%8MITPHPPHP &gt;=7.4 | &gt;=8.0CI failing

Since Oct 14Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/EscolaLMS/Templates)[ Packagist](https://packagist.org/packages/escolalms/templates)[ RSS](/packages/escolalms-templates/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (9)Versions (54)Used By (8)

Templates
=========

[](#templates)

[![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Templates/)[![codecov](https://camo.githubusercontent.com/a0402024e3ece40aabc25e64959d5af76a40f88617d935c4793ce530f81ad581/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f54656d706c617465732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4e52414e34523841475a)](https://codecov.io/gh/EscolaLMS/Templates)[![phpunit](https://github.com/EscolaLMS/Templates/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Templates/actions/workflows/test.yml)[![downloads](https://camo.githubusercontent.com/4ba4e495c73897db87fceb41686641bcb76f6d736254857a92f3606c3aaf3ece/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6573636f6c616c6d732f74656d706c61746573)](https://packagist.org/packages/escolalms/templates)[![downloads](https://camo.githubusercontent.com/25b1479244a3d008e88e6441edad531f88aec2e2336ed1838ce78aaef805ed0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6573636f6c616c6d732f74656d706c61746573)](https://packagist.org/packages/escolalms/templates)[![downloads](https://camo.githubusercontent.com/a64114f3c4f8ec7b46f3948df30cd271a922889dbaf07dcbed3eceaae56e9ebc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6573636f6c616c6d732f74656d706c61746573)](https://packagist.org/packages/escolalms/templates)

Purpose
-------

[](#purpose)

General purpose of this package is to store various templates in database and assigning them to Events so that content based on these templates is automatically generated and/or sent to users.

Usage
-----

[](#usage)

Each template is defined by

- `channel`: class defining how the template is handled
- `event`: event to which the template is assigned

For every channel &amp; event pair a single Variables definition is registered, which contains tokens that can be used in the template and replaced with values based on the data from the Event.

Analysing these three example files in [tests](https://github.com/EscolaLMS/Templates/tree/main/tests/Mock):

- TestChannel.php
- TestVariables.php
- TestEventWithGetters.php

and looking at the `Template` facade is simplest way to understand how this package works.

### Facade

[](#facade)

There is a `Template` facade declared, which is used to register Event-Channel-Variable sets and can be used in testing (as it can be replaced with a fake using `Template::fake()`).

To register Event-Channel-Variable set, `Template::register($eventClass, $channelClass, $variableClass)` must be called, where:

- `$eventClass` can be any class that is dispatched as an event in any EscolaLms package
- `$channelClass` must be a class implementing `TemplateChannelContract` interface declared in this package
- `$variableClass` must be a class implementing `TemplateVariableContract` interface declared in this package

### Channels &amp; variables

[](#channels--variables)

This package has no Channels or Variables defined, everything should be created in separate packages.

- [Templates-Email](https://github.com/EscolaLMS/Templates-Email)
- [Templates-Pdf](https://github.com/EscolaLMS/Templates-Pdf)
- [Templates-Sms](https://github.com/EscolaLMS/Templates-SMS)

### Event Wrapper

[](#event-wrapper)

`EscolaLms\Templates\Events\EventWrapper` is a class that wraps any event before trying to generate notification for it (and feed data from it to Template). This class contains methods for extracting necessary data from Event if that data is not available directly (for example User to which notification is being sent, and any other data that is required by registered Template).

Endpoints
---------

[](#endpoints)

All the endpoints are defined in [![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/templates/)

Tests
-----

[](#tests)

Run `./vendor/bin/phpunit --filter 'EscolaLms\\Templates\\Tests'` to run tests. See [tests](https://github.com/EscolaLMS/Templates/tree/main/tests) folder as it's quite good staring point as documentation appendix.

Test details: [![codecov](https://camo.githubusercontent.com/a0402024e3ece40aabc25e64959d5af76a40f88617d935c4793ce530f81ad581/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f54656d706c617465732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4e52414e34523841475a)](https://codecov.io/gh/EscolaLMS/Templates)[![phpunit](https://github.com/EscolaLMS/Templates/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Templates/actions/workflows/test.yml)

Listeners
---------

[](#listeners)

- `EscolaLms\Templates\Listeners\TemplateEventListener` this listeners listens to all `EscolaLms` namespace events, checks if event is registered for any Template, and passes the event wrapped in `EventWrapper` to processing (so if event is registered and has corresponding Template, notification using that Template will be sent)

Permissions
-----------

[](#permissions)

Permissions are defined in [Enum](https://github.com/EscolaLMS/Templates/blob/main/src/Enums/TemplatesPermissionsEnum.php) and seeded in [Seeder](https://github.com/EscolaLMS/Templates/blob/main/database/seeders/PermissionTableSeeder.php).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Recently: every ~23 days

Total

47

Last Release

1177d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c857f3115c790c573d0617d7e9ba4011269ef7b9dfdb003dc4388846a62b14f7?d=identicon)[qunabu](/maintainers/qunabu)

---

Top Contributors

[![pa-cholek](https://avatars.githubusercontent.com/u/5345420?v=4)](https://github.com/pa-cholek "pa-cholek (34 commits)")[![qunabu](https://avatars.githubusercontent.com/u/214608?v=4)](https://github.com/qunabu "qunabu (17 commits)")[![mako321](https://avatars.githubusercontent.com/u/59456825?v=4)](https://github.com/mako321 "mako321 (8 commits)")[![daVitekPL](https://avatars.githubusercontent.com/u/58150098?v=4)](https://github.com/daVitekPL "daVitekPL (6 commits)")[![dyfero](https://avatars.githubusercontent.com/u/59400506?v=4)](https://github.com/dyfero "dyfero (6 commits)")[![HerbertIV](https://avatars.githubusercontent.com/u/62691459?v=4)](https://github.com/HerbertIV "HerbertIV (5 commits)")[![krzEscola](https://avatars.githubusercontent.com/u/85549830?v=4)](https://github.com/krzEscola "krzEscola (3 commits)")[![KrzysztofDziedziechEscolasoft](https://avatars.githubusercontent.com/u/96292232?v=4)](https://github.com/KrzysztofDziedziechEscolasoft "KrzysztofDziedziechEscolasoft (2 commits)")[![dicani0](https://avatars.githubusercontent.com/u/58490533?v=4)](https://github.com/dicani0 "dicani0 (1 commits)")[![victazzz](https://avatars.githubusercontent.com/u/24989821?v=4)](https://github.com/victazzz "victazzz (1 commits)")

---

Tags

laraveltemplate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/escolalms-templates/health.svg)

```
[![Health](https://phpackages.com/badges/escolalms-templates/health.svg)](https://phpackages.com/packages/escolalms-templates)
```

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M63](/packages/knuckleswtf-scribe)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.4k](/packages/blair2004-nexopos)[ronasit/laravel-entity-generator

Provided console command for generating entities.

2053.1k](/packages/ronasit-laravel-entity-generator)[sylius/core-bundle

Sylius core bundle. It integrates all other bundles into full stack Symfony ecommerce solution.

22111.4k69](/packages/sylius-core-bundle)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k31](/packages/ronasit-laravel-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
