Laravel Attribute Atlas

All Laravel Attributes in a static catalog

Browse by groups, namespaces, and real usage examples.

Cataloged attributes

72

Base Laravel

13.x

Last update

2026-05-18

Console

Attributes for Artisan commands: signature, description, help text, and execution metadata.

Container

Attributes for dependency injection and contextual resolution in Laravel's service container.

#[Auth]

In the Container group, #[Auth] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.

Auth

#[Authenticated]

Attribute to inject authentication into a method parameter.

Authenticated

#[Bind]

Attribute to ensure the parameter is authenticated.

Bind

#[Cache]

Attribute to cache the result of a parameter.

Cache

#[Config]

In the Container group, #[Config] applies this configuration to the target Laravel element. It accepts 2 configuration parameters.

Config

#[Context]

In the Container group, #[Context] applies this configuration to the target Laravel element. It accepts 3 configuration parameters.

Context

#[CurrentUser]

The #[CurrentUser] attribute is used to inject the current user into the target Laravel element.

CurrentUser

#[Database]

The #[Database] attribute is used to inject the specified database connection into the target Laravel element.

Database

#[DB]

Automatically injects a database value into the specified parameter.

DB

#[Give]

Passes a specific value to a parameter in the service container.

Give

#[Log]

Configures a parameter for logging purposes.

Log

#[RouteParameter]

Maps a route parameter to a method parameter.

RouteParameter

#[Scoped]

Applies a scope configuration to the target element, ensuring a new instance is created for each request.

Scoped

#[Singleton]

Ensures that a single instance of the target element is used throughout the application.

Singleton

#[Storage]

Configures the target element to use a specific storage.

Storage

#[Tag]

Applies a tag to the target element for grouping or filtering.

Tag

Database / Eloquent

Attributes for Eloquent models, scopes, and data mapping.

#[Appends]

Adds virtual attributes to the Eloquent model during serialization.

Appends

#[Boot]

Initializes an action on the Eloquent model.

Boot

#[CollectedBy]

Specifies the collection class to be used for collecting model instances.

CollectedBy

#[Connection]

Defines the database connection for the model.

Connection

#[DateFormat]

Automatically formats date data in an Eloquent model.

DateFormat

#[Fillable]

Specifies which fields can be mass-assigned in an Eloquent model.

Fillable

#[Guarded]

Specifies which fields cannot be mass-assigned in an Eloquent model.

Guarded

#[Hidden]

Specifies which fields should be hidden during serialization of an Eloquent model.

Hidden

#[Initialize]

Automatically initializes an action or method in the Eloquent model.

Initialize

#[ObservedBy]

Specifies the class or classes that observe changes in an Eloquent model.

ObservedBy

#[Scope]

Defines a custom scope for Eloquent queries.

Scope

#[ScopedBy]

Specifies the class or classes that define a scope for an Eloquent model.

ScopedBy

#[Table]

In the Database / Eloquent group, #[Table] applies this configuration to the target Laravel element. It accepts 6 configuration parameters.

Table

#[Touches]

In the Database / Eloquent group, #[Touches] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.

Touches

#[Unguarded]

In the Database / Eloquent group, #[Unguarded] applies this configuration to the target Laravel element. It requires no configuration parameters.

Unguarded

#[UseEloquentBuilder]

Uses a custom Eloquent builder.

UseEloquentBuilder

#[UseFactory]

Uses a factory to create Eloquent model instances.

UseFactory

#[UsePolicy]

Applies an authorization policy to the Eloquent model.

UsePolicy

#[UseResource]

Maps a resource to the Eloquent model.

UseResource

#[UseResourceCollection]

Maps a resource collection to the Eloquent model.

UseResourceCollection

#[Visible]

The #[Visible] attribute allows you to specify which fields should be visible during the serialization of an Eloquent model.

Visible

#[WithoutIncrementing]

The #[WithoutIncrementing] attribute prevents the Eloquent model from automatically incrementing the ID field.

WithoutIncrementing

#[WithoutTimestamps]

The #[WithoutTimestamps] attribute disables automatic timestamps (created_at and updated_at) fields in the Eloquent model.

WithoutTimestamps

Database / Eloquent / Factories

Attributes for Eloquent models, scopes, and data mapping.

Foundation / Http

Official Laravel attributes for Foundation / Http.

Foundation / Testing

Official Laravel attributes for Foundation / Testing.

Http / Resources

Official Laravel attributes for Http / Resources.

Queue

Attributes for queued jobs: connection, retries, timeout, backoff, and uniqueness.

Routing

Attributes to declare HTTP routes directly on classes and methods.