PHPackages                             bladedirectives/bladedirectives - 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. bladedirectives/bladedirectives

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

bladedirectives/bladedirectives
===============================

A Collection of Laravel Blade Directives Package.

1.0.0(7y ago)013MITPHPPHP &gt;=5.6

Since May 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bladedirectives/bladedirectives)[ Packagist](https://packagist.org/packages/bladedirectives/bladedirectives)[ Docs](https://bladedirectives.github.io/)[ RSS](/packages/bladedirectives-bladedirectives/feed)WikiDiscussions master Synced 2d ago

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

Directives
==========

[](#directives)

A collection of a Nice Laravel Blade directives.

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

[](#installation)

You can install the package via composer:

```
composer require bladedirectives/bladedirectives
```

Usage
-----

[](#usage)

### @istrue

[](#istrue)

Only show when `$variable` isset and true.

```
@istrue($variable)
   This will be echoed
@endistrue
```

Or when you would like to quickly echo

```
@istrue($variable, 'This will be echoed')
```

### @isfalse

[](#isfalse)

Same as `@istrue` but checks for isset and false.

```
@isfalse($variable)
   This 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
```

### @dump and @dd

[](#dump-and-dd)

```
@dump($var)

@dd($var)
```

### @mix

[](#mix)

Create a HTML element to your Laravel-Mix css or js.

```
@mix('/css/app.css')
@mix('/js/app.js')
```

Output:

```

```

### @style

[](#style)

Create a `` element or `` element with a css path.

```
@style
    body { background: black }
@endstyle

@style('/css/app.css')
```

### @script

[](#script)

Create a `` element with or without a js path.

```
@script
    alert('hello world')
@endscript

@script('/js/app.js')
```

### @inline

[](#inline)

Load the contents of a css or js file inline in your view.

```
@inline('/js/manifest.js')
```

### @pushonce

[](#pushonce)

Same as `@push` but will include content one time only. Useful for repeatable blocks.

First parameter must follow the syntax `stack-name:group-name`.

```
@pushonce('js:foobar')

@endpushonce
```

Include pushes with standard `@stack` directive:

```
@stack('js')
```

### @routeis

[](#routeis)

Checks if the current route name is equal to the given parameter. You can use a wildcard like `blog.post.*`.

```
@routeis('webshop.checkout')
    Do something only on the checkout
@endrouteis
```

### @routeisnot

[](#routeisnot)

Checks if the current route name is not equal to the given parameter. You can use a wildcard like `blog.post.*`

```
@routeisnot('webshop.checkout')
    Do something only if this is not the checkout
@endrouteisnot
```

### @instanceof

[](#instanceof)

Checks if the first parameter is an instance of the second parameter.

```
@instanceof($user, 'App\User')
    User is an instance of App\User
@endinstanceof
```

### @typeof

[](#typeof)

Checks if the parameter is of a certain type.

```
@typeof($text, 'string')
    Text is a string
@endtypeof
```

### @repeat

[](#repeat)

Repeat something a specified amount of times.

```
@repeat(3)
    Iteration #{{ $iteration }}
@endrepeat
```

### @fa, @fas, @far, @fal, @fab, @mdi, @glyph

[](#fa-fas-far-fal-fab-mdi-glyph)

Quickly output an icon with Font Awesome, Material Design Icons or Glyphicon.

```
@fa('address-book', 'optional-extra-class')

// for Font Awesome 5 (solid, regular, light, brand):
@fas('address-book', 'optional-extra-class')
@far('address-book', 'optional-extra-class')
@fal('address-book', 'optional-extra-class')
@fab('address-book', 'optional-extra-class')

// for Material Design Icons
@mdi('account', 'optional-extra-class')

// for Glyphicons
@glyph('glass', 'optional-extra-class')
```

### @data

[](#data)

Output data-attributes from an array.

```
@data(['testing' => 123])
```

Testing
-------

[](#testing)

```
composer test
```

Documentation
-------------

[](#documentation)

See  for the full online documentation.

Contribution
------------

[](#contribution)

For any contribution, Please hit a pull request. Mail me at

License
-------

[](#license)

Translator is open-sourced software licensed under the MIT license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

2567d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[cagilo/cagilo

A set of open-source Blade components for the Laravel Framework

172996.5k](/packages/cagilo-cagilo)[orchid/blade-icons

An easy way inline SVG images in your Blade templates.

223.4M9](/packages/orchid-blade-icons)[wireui/heroicons

The Tailwind Heroicons for laravel blade by WireUI

43390.8k5](/packages/wireui-heroicons)[stillat/antlers-components

2656.0k1](/packages/stillat-antlers-components)[itstructure/laravel-grid-view

Grid view for laravel framework

2546.6k2](/packages/itstructure-laravel-grid-view)[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3211.5k](/packages/ycs77-inertia-laravel-ssr-head)

PHPackages © 2026

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