PHP code example of fenzland / laravel-helpers

1. Go to this page and download the library: Download fenzland/laravel-helpers library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fenzland / laravel-helpers example snippets


// 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');

$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', ],
]
 php
/*
$foo->doSomething($bar->someObject->someValue());
/*/
z($foo->doSomething(z(z($bar->someObject)->someValue())));
//*/