2017 © Pedro Peláez
 

library laravel-helpers

Helper functions for laravel.

image

fenzland/laravel-helpers

Helper functions for laravel.

  • Wednesday, September 27, 2017
  • by Fenzland
  • Repository
  • 1 Watchers
  • 3 Stars
  • 77 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 10 % Grown

The README.md

Fenzland Laravel Helper

Some useful helper functions for laravel., (*1)

Usage

Step 1. Install with composer., (*2)

composer require fenzland/laravel-helpers

Step 2. Enjoy., (*3)

Functions

z()

If you dump something with dd(), the program will be terminated. Sometimes (or usually), that's not what we want. Instead of exit, z() will dump what you give and return it back. So you can dump values in your process without side effect., (*4)

``` php /* $foo->doSomething($bar->someObject->someValue()); // z($foo->doSomething(z(z($bar->someObject)->someValue()))); ///, (*5)


## routo() Similar with route(), but smarter. ```php // Case 1: In page foo.bar.projects.index , call routo('.show',[ 'project'=>$project, ]) === route('foo.bar.projects.show',[ 'project'=>$project, ]); // Case 2: In page foo.bar.projects.show with param [ project=>$project, ] routo('.edit') === route('foo.bar.projects.edit',[ 'project'=>$project, ]); // Case 3: In page Foo:foo.foo.foo routo(':bar') === route('Foo:bar');

array_transposition()

Transposition a matrix, whitch is an array of some array with same structure., (*6)

$fromArray= [
    'foo'=> [
        'foo1',
        'foo2',
        'foo3',
        'foo4',
    ],
    'bar'=> [
        'bar1',
        'bar2',
        'bar3',
        'bar4',
    ],
]
array_transposition($fromArray) === [
    [ 'foo'=>'foo1', 'bar'=>'bar1', ],
    [ 'foo'=>'foo2', 'bar'=>'bar2', ],
    [ 'foo'=>'foo3', 'bar'=>'bar3', ],
    [ 'foo'=>'foo4', 'bar'=>'bar4', ],
]

License

MIT license., (*7)

The Versions

27/09 2017

dev-master

9999999-dev

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

27/09 2017

1.0.0

1.0.0.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

18/04 2017

0.1.5

0.1.5.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

29/11 2016

0.1.4

0.1.4.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

26/11 2016

0.1.3

0.1.3.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

23/11 2016

0.1.2

0.1.2.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

18/11 2016

0.1.1

0.1.1.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah

01/11 2016

0.1.0

0.1.0.0

Helper functions for laravel.

  Sources   Download

MIT

The Requires

 

by Fenz Yeah