2017 © Pedro Peláez
 

library laravel-closures-container

Easy to use closures container for Laravel. First register the closure then use it anywhere.

image

lachezargrigorov/laravel-closures-container

Easy to use closures container for Laravel. First register the closure then use it anywhere.

  • Saturday, October 14, 2017
  • by lachezargrigorov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Simple closures container for Laravel.

Latest Stable Version Latest Unstable Version Software License Build Status Total Downloads, (*1)

Easy to use closures container. First register the closure then use it anywhere., (*2)

Install

Via Composer, (*3)

``` bash $ composer require lachezargrigorov\laravel-closures-container, (*4)


If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php: ```php Lachezargrigorov\ClosuresContainer\ClosuresContainerServiceProvider::class,

If you do not run Laravel 5.5 and want to use the facade, add this to your aliases in app.php:, (*5)

"Closures" => Lachezargrigorov\ClosuresContainer\Facades\Facade::class,

Usage

``` php, (*6)

//using Facades, (*7)

Closures::register("sumTwoNumbers",function($a,$b) { return $a + $b; });, (*8)

$sum = Closures::sumTwoNumbers(1,2); //3, (*9)

$bool = Closures::isRegistered("sumTwoNumbers");, (*10)

//using IOC, (*11)

$closures = app("closures");, (*12)

$closures->register("sumTwoNumbers",function($a,$b) { return $a + $b; });, (*13)

$sum = $closures->sumTwoNumbers(1,2); //3, (*14)

$bool = $closures->isRegistered("sumTwoNumbers");, (*15)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING , ISSUE_TEMPLATE and PULL_REQUEST_TEMPLATE for details., (*16)

Security

If you discover any security related issues, please email lachezar@grigorov.website instead of using the issue tracker., (*17)

Credits

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

14/10 2017

dev-master

9999999-dev https://github.com/lachezargrigorov/laravel-closures-container

Easy to use closures container for Laravel. First register the closure then use it anywhere.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel closures closures container

14/10 2017

v1.0.1

1.0.1.0 https://github.com/lachezargrigorov/laravel-closures-container

Easy to use closures container for Laravel. First register the closure then use it anywhere.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel closures closures container

13/10 2017

v1.0.0

1.0.0.0 https://github.com/lachezargrigorov/laravel-closures-container

Easy to use closures container for Laravel. First register the closure then use it anywhere.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel closures closures container