Laravel Service Container: Service Container: Binding Interfaces To Implementations
Service Container: Binding Interfaces To Implementations
$this->app->bind(
'App\Contracts\EventPusher',
'App\Services\RedisEventPusher'
); Use App\Contracts\EventPusher;
/**
* Create a new class instance.
*
* @param EventPusher $pusher
* @return void
*/
public function __construct(EventPusher $pusher)
{
$this->pusher = $pusher;
}
Semantic portal