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

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

younesi/blade-directives
========================

Magic Directives for Blade

1.0.0(8y ago)113MITPHPPHP &gt;=5.3.0

Since Feb 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Younesi/blade-directives)[ Packagist](https://packagist.org/packages/younesi/blade-directives)[ Docs](https://github.com/younesi/blade-directives)[ RSS](/packages/younesi-blade-directives/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP Blade Directives
====================

[](#php-blade-directives)

Laravel Custom Blade directives for Laravel Applications.

See

Installation:

`$ composer require younesi/blade-directives`

Available directives:
---------------------

[](#available-directives)

### @persianNum

[](#persiannum)

*convert latin numbers to their persian equvalent*

```
@persianNum('Persian Numbers 9123456780 اعداد فارسی')
   //will produce "Persian Numbers ۹۱۲۳۴۵۶۷۸۰ اعداد فارسی"

```

### @isTrue

[](#istrue)

*Only show when $variable isset and true*

```
@isTrue($variable)
   This will be echoed
@endisTrue

```

### @isFalse

[](#isfalse)

*Same as @istrue but checks for isset and false*

```
@isFalse($variable)
   if $variable is False hhis will be echoed
@endisFalse

```

### @isNull

[](#isnull)

*Only show when $variable is null*

```
@isNull($variable)
   This will be echoed
@endisNull

```

### @isNotNull

[](#isnotnull)

*Same as @isnull but one shows when $variable is not null*

```
@isNotNull($variable)
   This will be echoed
@endIsNotNull

```

### @dd

[](#dd)

```
@dd($var)

```

### @dump

[](#dump)

```
@dump($var)

```

### @action

[](#action)

*check route action*

```
@action('index')
     This is rendered only if route's action is Index.
@endaction

```

or

```
@action('index')
     This is rendered only if route's action is Index.
@elseaction('edit')
     This is rendered only if route's action is Edit.
@else
     This is rendered only if route's action neither is Index nor Edit.
@endaction

```

### @env

[](#env)

*check app environment*

```
@env('local')
    // The application is in the local environment...
@elseenv('testing')
    // The application is in the testing environment...
@else
    // The application is not in the local or testing environment...
@endenv

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

2994d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bd93d6e03b99e647f18cd5df832b93c3d748860d3ef83e81968bfe9ea1840c7?d=identicon)[Younesi](/maintainers/Younesi)

---

Top Contributors

[![Younesi](https://avatars.githubusercontent.com/u/12968840?v=4)](https://github.com/Younesi "Younesi (1 commits)")

---

Tags

laravelbladeextendeddirectiveyounesi

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-blade-javascript

A Blade directive to export variables to JavaScript

638855.8k9](/packages/spatie-laravel-blade-javascript)[radic/blade-extensions

Laravel package providing additional Blade extensions: foreach (with $loop data like twig), break, continue, set,array (multiline), etc

271321.7k5](/packages/radic-blade-extensions)[angus-mcritchie/blade-boost-directive

Lightning-Fast Blade Components with `@boost` Directive

3910.0k](/packages/angus-mcritchie-blade-boost-directive)

PHPackages © 2026

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