PHPackages                             thejager/directives - 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. thejager/directives

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

thejager/directives
===================

A simpler way to define partial-like custom Blade directives using Blade files.

1.0.1(10y ago)122MITPHP

Since Jun 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thejager/directives)[ Packagist](https://packagist.org/packages/thejager/directives)[ RSS](/packages/thejager-directives/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Directives
==========

[](#directives)

this package allows you to easily add new directives from Blade files.

How to set it up.
-----------------

[](#how-to-set-it-up)

1. First thing you need to do is install the package. You can do this with composer by running 'composer require thejager/directives'.
2. Next thing you need to do is add the service provider `TheJager\Directives\DirectivesServiceProvider` to your config/app.php.
3. Create the directory 'resources/views/directives'.

How to use it (example)
-----------------------

[](#how-to-use-it-example)

Let's create a `@date()` directive. When using `@date(Carbon\Carbon::now())` in a blade view, we want it to output the current date in dd-mm-yyyy format.

1. First thing we do is create the blade file. Create a new Blade template 'date.blade.php' in the 'resources/views/directives/' folder containing `{{ $param->format('d-m-Y') }}`. Note that the parameter passed to the directive is stored in `$param`. At this moment you can not pass multiple parameters, but you could pass an array of parameters if you want ;)
2. That's it. You can now use the `@date()` directive in your Blade files to which you can pass any Carbon instance.

Suggestions
-----------

[](#suggestions)

Feel free to suggest changes, collaborate, suggest new features etc.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity64

Established project with proven stability

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 ~0 days

Total

2

Last Release

3673d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/156292b7c4958833db10b2ee1663a9a876ec04f853d963f3973d4c2981207fc3?d=identicon)[thejager](/maintainers/thejager)

### Embed Badge

![Health badge](/badges/thejager-directives/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[illuminate/view

The Illuminate View package.

13046.3M2.1k](/packages/illuminate-view)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

721160.4k12](/packages/tallstackui-tallstackui)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5452.7k](/packages/hasinhayder-tyro-dashboard)

PHPackages © 2026

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