PHPackages                             meita/shams - 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. meita/shams

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

meita/shams
===========

Shams template engine: Blade-style PHP views with .shams templates and component support.

1.0.0(6mo ago)021MITPHPPHP &gt;=8.0

Since Dec 21Pushed 6mo agoCompare

[ Source](https://github.com/EngMEita/shams)[ Packagist](https://packagist.org/packages/meita/shams)[ RSS](/packages/meita-shams/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (1)

Shams Template Engine
=====================

[](#shams-template-engine)

Shams is a Blade-style PHP template engine with `.shams` templates, reusable components, and a compact, dependency-free core.

Features
--------

[](#features)

- Blade-like syntax: `@if`, `@foreach`, `@extends`, `@section`, `@include`, `@component`, stacks, and more.
- HTML-escaped and raw echo tags: `{{ }}` and `{!! !!}`.
- Bootstrap 5-friendly built-in components with attribute bags and slots.
- Component tags like `` and ``.
- View composers and shared data.
- Optional cache auto-reload for a fast dev loop.
- Helpers like `@csrf`, `@method`, `@json`, `@asset`, `@once`, `@env`, and attribute helpers.

Installation
------------

[](#installation)

```
composer require meita/shams
```

Frontend Dependencies (Bootstrap 5, jQuery, DataTables, Select2)
----------------------------------------------------------------

[](#frontend-dependencies-bootstrap-5-jquery-datatables-select2)

Shams does not bundle CSS/JS. Use your own build pipeline or drop in CDNs. DataTables and Select2 require jQuery.

### CDN (quick start)

[](#cdn-quick-start)

```

```

```

  $(function () {
    $('.datatable').DataTable();
    $('.select2').select2();
  });

```

### npm (optional)

[](#npm-optional)

```
npm i bootstrap@5 jquery datatables.net datatables.net-bs5 select2
```

Quick Start
-----------

[](#quick-start)

```
