AttributeIlluminate\Container\Attributes\CurrentUser
#[CurrentUser]
The #[CurrentUser] attribute is used to inject the current user into the target Laravel element.
Available since
Laravel 13.0
Targets
parameter
Parameters
Nenhum parâmetro obrigatório ou opcional.
Practical usage
use Illuminate\Container\Attributes\CurrentUser;
class ReportsController
{
public function __invoke(#[CurrentUser] mixed $value): array
{
return ['status' => 'ok'];
}
}