~/talk

Fantastic Enums and Where to Find Them

TalkinItalianat laravelday 2024 · on Thursday, 2024-11-07· [php]
slides:none on file

Covers use of PHP enums (PHP 8.1) and Laravel features: explains backed enums with string/int and from()/tryFrom(), Laravel model casting (since 8.69) and current route-binding limits for string-backed enums. Shows community packages and traits that add automatic model casting, from/tryFrom for pure (non-backed) enums, and storing enum collections as JSON for multi-enum fields, plus a lightweight state-machine package that enforces allowed transitions and throws on invalid assignments.

AI-written summary · about

  1. 0:00PHP Enums intro
  2. 1:04What enums are
  3. 3:56Enum methods & interfaces
  4. 6:52Enums with Laravel
  5. 10:01Practical Enum use cases
  6. 15:58Best practices for enums
  7. 19:50Extending enums
  8. 24:12Advanced Laravel Enum packages
  9. 29:47Enums as state machines
  10. 32:17Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.