bind method laravel code example
Example: how to use service container in laravel
use App\Services\Transistor;
$this->app->resolving(Transistor::class, function ($api, $app) {
// Called when container resolves objects of type "HelpSpot\API"...
});
$this->app->resolving(function ($object, $app) {
// Called when container resolves object of any type...
});