2017 © Pedro Peláez
 

library blade-directives

Magic Directives for Blade

image

younesi/blade-directives

Magic Directives for Blade

  • Tuesday, February 27, 2018
  • by Younesi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP Blade Directives

Laravel Custom Blade directives for Laravel Applications., (*1)

See https://laravel.com/docs/blade, (*2)

Installation:, (*3)

$ composer require younesi/blade-directives, (*4)

Available directives:

@persianNum

convert latin numbers to their persian equvalent, (*5)

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

@isTrue

Only show when $variable isset and true, (*6)

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

@isFalse

Same as @istrue but checks for isset and false, (*7)

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

@isNull

Only show when $variable is null, (*8)

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

@isNotNull

Same as @isnull but one shows when $variable is not null, (*9)

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

@dd

@dd($var)

@dump

@dump($var)

@action

check route action, (*10)

@action('index')
     <p>This is rendered only if route's action is Index.</p>
@endaction

or, (*11)

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

@env

check app environment, (*12)

@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

The Versions

27/02 2018

dev-master

9999999-dev https://github.com/younesi/blade-directives

Magic Directives for Blade

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Mahdi Younesi

laravel blade directive extended younesi

27/02 2018

1.0.0

1.0.0.0 https://github.com/younesi/blade-directives

Magic Directives for Blade

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Mahdi Younesi

laravel blade directive extended younesi