2017 © Pedro Peláez
 

package laravel-blade-pack

Laravel package with Blade extensions and directives for torzer projects

image

torzer/laravel-blade-pack

Laravel package with Blade extensions and directives for torzer projects

  • Wednesday, July 5, 2017
  • by nunomazer
  • Repository
  • 2 Watchers
  • 0 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Laravel Blade Pack

Laravel package with Blade extensions and directives for projects torzer.com., (*1)

Installing and setting

Installing

At required section in composer.json file add:, (*2)

"require": {
        ...
        "torzer/laravel-blade-pack": "^1",
        ...
    },

Then run composer update., (*3)

Configuring

In config/app.php file, in array providers :, (*4)

    'providers' => [
        ...
        Torzer\Common\Blade\ServiceProvider::class,
        ...
    ]

Directives

csrf

A directive to remove all the csrf from the layout., (*5)

@csrf()

Access with Javascript as window.Laravel.csrfToken., (*6)

If you need to change the namespace to something different than window.Laravel., (*7)

@csrf('Torzer')

Would set it in, (*8)

window.Torzer.csrfToken

dd

The dd (dump and die) function as a Blade directive., (*9)

@dd($var)

dump

The var_dump function as a Blade directive., (*10)

@dump($var)

explode

The explode function as a Blade directive., (*11)

@explode(',', $string)

implode

The implode function as a Blade directive., (*12)

@implode(',', $array)

set

A Blade directive to set value to a PHP variable., (*13)

@set(5, $var)

// then you can keep using the var in the same Blade view
@if($var > 10)
   ...
@endif

setJs

A Blade directive to set a PHP Laravel value accessible as a JS variable., (*14)

@js(token,$token)

Then you can access these data from window object in javascript, (*15)

window.token

The Versions

05/07 2017

dev-master

9999999-dev

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

05/07 2017

1.2.1

1.2.1.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

05/07 2017

1.2.0

1.2.0.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

05/07 2017

1.1.0

1.1.0.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

04/07 2017

1.0.3

1.0.3.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

04/07 2017

1.0.2

1.0.2.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

04/07 2017

1.0.1

1.0.1.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen

04/07 2017

1.0.0

1.0.0.0

Laravel package with Blade extensions and directives for torzer projects

  Sources   Download

MIT

The Requires

 

by Ademir Mazer Junior
by torzer
by Oseas Tormen