0106nobodyさん
2020/02/26(水) 22:22:01.16ID:xF0YP2EXclass SampleController extends Controller
{
protected $componentService;
public function __construct(ComponentService $componentService)
{
$this->componentService = $componentService;
}
と書いただけで、ComponentService がインジェクションされてます。
サービスプロバイダを作成したり、app.phpに登録とかしなくても、です。
デフォルトでコンストラクタインジェクションされるんですか?
サービスプロバイダの意味がいまいち分からなくなってます。