Skip to content

Glossary: Laravel

Casts

Also written: casts(), cast

A model method that converts column values to a useful type, such as 'decimal:2' for a price string like "16.00", 'boolean' for is_staff, or 'hashed' for passwords.

Where the book teaches it

Related terms

ModelHash