AttributeIlluminate\Container\Attributes\Scoped
#[Scoped]
Applies a scope configuration to the target element, ensuring a new instance is created for each request.
Available since
Laravel 13.0
Targets
class
Parameters
Nenhum parâmetro obrigatório ou opcional.
Practical usage
use Illuminate\Container\Attributes\Scoped;
class ReportsController {
public function __invoke(#[Scoped] ReportService $reportService): array
{
return ['status' => 'ok'];
}
}