PHP 8.3 Enums in Laravel: Casts, Routes &amp; Validation | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules        On this page       1. [  Why Enums Deserve More Than a Cast ](#why-enums-deserve-more-than-a-cast)
2. [  1. The Enum Itself — With Behaviour ](#1-the-enum-itself-with-behaviour)
3. [  2. Eloquent Cast ](#2-eloquent-cast)
4. [  Guarding transitions in an Action ](#guarding-transitions-in-an-action)
5. [  3. Route Model Binding for Enum Segments ](#3-route-model-binding-for-enum-segments)
6. [  4. Reusable Enum Validation Rule ](#4-reusable-enum-validation-rule)
7. [  Takeaways ](#takeaways)

  ![Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules](https://cdn.msaied.com/706/a9d051bc039469c10d1d4c5fc364e598.png)

  #laravel   #php8.3   #enums   #eloquent   #validation  

 Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules 
===============================================================================

     26 Sep 2026      1 min read    ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)  Mohamed Said  

       Table of contents

1. [  01   Why Enums Deserve More Than a Cast  ](#why-enums-deserve-more-than-a-cast)
2. [  02   1. The Enum Itself — With Behaviour  ](#1-the-enum-itself-with-behaviour)
3. [  03   2. Eloquent Cast  ](#2-eloquent-cast)
4. [  04   Guarding transitions in an Action  ](#guarding-transitions-in-an-action)
5. [  05   3. Route Model Binding for Enum Segments  ](#3-route-model-binding-for-enum-segments)
6. [  06   4. Reusable Enum Validation Rule  ](#4-reusable-enum-validation-rule)
7. [  07   Takeaways  ](#takeaways)

 Why Enums Deserve More Than a Cast
----------------------------------

Laravel has supported `AsEnum` casting since 9.x, but most codebases stop there. A backed enum can do far more: it can self-validate, resolve from a route segment, and carry domain behaviour. This article wires all three together so the enum becomes the single source of truth for a concept like `OrderStatus`.

---

1. The Enum Itself — With Behaviour
-----------------------------------

```php
