1use App\Services\Transistor;
2
3$this->app->resolving(Transistor::class, function ($api, $app) {
4 // Called when container resolves objects of type "HelpSpot\API"...
5});
6
7$this->app->resolving(function ($object, $app) {
8 // Called when container resolves object of any type...
9});
1<?php
2
3class Service
4{
5 //
6}
7
8Route::get('/', function (Service $service) {
9 die(get_class($service));
10});
1<?php
2
3class Service
4{
5 //
6}r
7
8Route::get('/', function (Service $service) {
9 die(get_class($service));
10});