Laravel ServiceProviderの bind / singleton の使い分け
使い分け
// singleton を利用すると内容が cache される $this->app->singleton(MemoServiceInterface::class, MemoService::class); // bind でも同様に動作するが、 cache されない $this->app->bind(MemoServiceInterface::class, MemoService::class);
余談
ぐるぐるまわって、今更だけどサービスコンテナに感動してる。
なんなのこれ。魔法すぎる。