Route::get('/test-service-without-construct', function () {
return app(ExampleServiceWithoutConstructor::class)->render();
});
Tests: Tests Service without constructor
Route::get('/test-service-with-construct', function () {
return app(ExampleServiceWithConstructor::class, [
'message' => 'msg native set'
])->render();
});
Tests: Tests Service with constructor
Route::get('/test-service-with-construct-and-dependency', function () {
return app(ExampleServiceWithConstructorDependency::class, [
'exampleDependency' => app(ExampleDependency::class)
])->render();
});