AttributeIlluminate\Container\Attributes\Bind
#[Bind]
Attribute to ensure the parameter is authenticated.
Available since
Laravel 13.0
Targets
class
Parameters
$concretestringDefines the "concrete" value used by the attribute. Expected type: string.
$environmentsstring|array|UnitEnumDefines the "environments" value used by the attribute. Expected type: string|array|UnitEnum.
Practical usage
use Illuminate\Container\Attributes\Authenticated;
class ReportsController {
public function __invoke(#[Authenticated('web')] mixed $user): array {
return ['status' => 'ok'];
}
}