Cataloged attributes
72
Laravel Attribute Atlas
Browse by groups, namespaces, and real usage examples.
72
13.x
2026-05-18
Attributes for Artisan commands: signature, description, help text, and execution metadata.
Applies alternative aliases to the Artisan command. Allows multiple aliases.
Aliases
Provides a human-readable description for the Artisan command.
Description
Provides contextual help for the Artisan command.
Help
Hides the Artisan command from the list of commands.
Hidden
Defines the signature of an Artisan command. It includes the command name and optional aliases.
Signature
Defines the usage example for an Artisan command.
Usage
Attributes for dependency injection and contextual resolution in Laravel's service container.
In the Container group, #[Auth] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.
Auth
Attribute to inject authentication into a method parameter.
Authenticated
Attribute to ensure the parameter is authenticated.
Bind
Attribute to cache the result of a parameter.
Cache
In the Container group, #[Config] applies this configuration to the target Laravel element. It accepts 2 configuration parameters.
Config
In the Container group, #[Context] applies this configuration to the target Laravel element. It accepts 3 configuration parameters.
Context
The #[CurrentUser] attribute is used to inject the current user into the target Laravel element.
CurrentUser
The #[Database] attribute is used to inject the specified database connection into the target Laravel element.
Database
Automatically injects a database value into the specified parameter.
DB
Passes a specific value to a parameter in the service container.
Give
Configures a parameter for logging purposes.
Log
Maps a route parameter to a method parameter.
RouteParameter
Applies a scope configuration to the target element, ensuring a new instance is created for each request.
Scoped
Ensures that a single instance of the target element is used throughout the application.
Singleton
Configures the target element to use a specific storage.
Storage
Applies a tag to the target element for grouping or filtering.
Tag
Attributes for Eloquent models, scopes, and data mapping.
Adds virtual attributes to the Eloquent model during serialization.
Appends
Initializes an action on the Eloquent model.
Boot
Specifies the collection class to be used for collecting model instances.
CollectedBy
Defines the database connection for the model.
Connection
Automatically formats date data in an Eloquent model.
DateFormat
Specifies which fields can be mass-assigned in an Eloquent model.
Fillable
Specifies which fields cannot be mass-assigned in an Eloquent model.
Guarded
Specifies which fields should be hidden during serialization of an Eloquent model.
Hidden
Automatically initializes an action or method in the Eloquent model.
Initialize
Specifies the class or classes that observe changes in an Eloquent model.
ObservedBy
Defines a custom scope for Eloquent queries.
Scope
Specifies the class or classes that define a scope for an Eloquent model.
ScopedBy
In the Database / Eloquent group, #[Table] applies this configuration to the target Laravel element. It accepts 6 configuration parameters.
Table
In the Database / Eloquent group, #[Touches] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.
Touches
In the Database / Eloquent group, #[Unguarded] applies this configuration to the target Laravel element. It requires no configuration parameters.
Unguarded
Uses a custom Eloquent builder.
UseEloquentBuilder
Uses a factory to create Eloquent model instances.
UseFactory
Applies an authorization policy to the Eloquent model.
UsePolicy
Maps a resource to the Eloquent model.
UseResource
Maps a resource collection to the Eloquent model.
UseResourceCollection
The #[Visible] attribute allows you to specify which fields should be visible during the serialization of an Eloquent model.
Visible
The #[WithoutIncrementing] attribute prevents the Eloquent model from automatically incrementing the ID field.
WithoutIncrementing
The #[WithoutTimestamps] attribute disables automatic timestamps (created_at and updated_at) fields in the Eloquent model.
WithoutTimestamps
Attributes for Eloquent models, scopes, and data mapping.
Official Laravel attributes for Foundation / Http.
Applies an error bag to the target element, allowing for the capture of error messages.
ErrorBag
Fails when there are unknown fields in the data input.
FailOnUnknownFields
Redirects to a specified URL.
RedirectTo
Redirects to a specified route.
RedirectToRoute
To stop execution on the first encountered error.
StopOnFirstFailure
Official Laravel attributes for Foundation / Testing.
Attribute to configure the seed for tests in the Foundation / Testing group.
Seed
Attribute to configure a test seeder in the Foundation / Testing group.
Seeder
Attribute to configure the setup for tests in the Foundation / Testing group.
SetUp
Attribute to configure the tear down for tests in the Foundation / Testing group.
TearDown
Attribute used to mark unit test methods in Laravel.
UnitTest
Official Laravel attributes for Http / Resources.
In the Http / Resources group, #[Collects] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.
Collects
In the Http / Resources group, #[PreserveKeys] applies this configuration to the target Laravel element. It requires no configuration parameters.
PreserveKeys
Attributes for queued jobs: connection, retries, timeout, backoff, and uniqueness.
Backoff configuration for queued jobs, determining the interval between retry attempts.
Backoff
Queue connection configuration for a job.
Connection
Debounce configuration for a job, preventing repeated executions.
DebounceFor
Delay configuration for a job, determining the wait time before execution.
Delay
Mark the job for deletion if the models do not exist.
DeleteWhenMissingModels
Fail the job if the timeout occurs.
FailOnTimeout
Limit the maximum number of exceptions a job can have.
MaxExceptions
Specifies the queue for the job.
Queue
In the Queue group, #[Timeout] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.
Timeout
In the Queue group, #[Tries] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.
Tries
In the Queue group, #[UniqueFor] applies this configuration to the target Laravel element. It accepts 1 configuration parameter.
UniqueFor
Ignores a model's relationships when processing a queued job.
WithoutRelations
Attributes to declare HTTP routes directly on classes and methods.