PHP code example of greabock / maker
1. Go to this page and download the library: Download greabock/maker 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/ */
greabock / maker example snippets
app(Maker::class)->make(Some::class, ['foo' => 'some', 'bar' => 'other'])
// or
make(Some::class, ['foo' => 'some', 'bar' => 'other']);
use Illuminate\Contracts\Container\Container;
use Greabock\Maker\Maker;
app(Maker::class)->bind(Some::class, function(Container $container, $parameters){
$some = $container->make(Some::class);
$some->doSomeThing($parameters);
return $some;
});