PHP code example of p7v / illuminate-container-slim-bridge
1. Go to this page and download the library: Download p7v/illuminate-container-slim-bridge 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/ */
p7v / illuminate-container-slim-bridge example snippets
= \P7v\IlluminateContainerSlim\Bridge::create();
tainer = new \Illuminate\Container\Container();
/** Configure your container */
$app = \P7v\IlluminateContainerSlim\Bridge::create($container);
class AppServiceProvider extends \P7v\IlluminateContainerSlim\ServiceProvider
{
public function register(): void
{
$this->bind('key', function () {
return new stdClass();
});
$this->singleton(RepositoryInterface::class, Repository::class);
}
}