Laravel Serializable Closure: serialize the unserializable
Автор: Aaron Francis
Загружено: 2025-07-08
Просмотров: 7902
PHP doesn’t let you serialize closures, but Laravel does, thanks to an underrated package that’s built into the framework. I show you exactly how Laravel serializable-closure works, how Laravel uses it internally, and how you can use it safely (and securely!) in your own projects.
Check out Bento at: https://bentonow.com and be sure to sign up for my weekly newsletter at https://aaronfrancis.com/newsletter
GitHub repo: https://github.com/laravel/serializab...
Follow me:
Twitter: / aarondfrancis
LinkedIn: / aarondfrancis
Website: https://aaronfrancis.com - find articles, podcasts, courses, and more.
Chapters:
00:00 - Why you can’t serialize closures in PHP
00:22 - Introducing Laravel Serializable Closure
01:12 - Don’t install it—Laravel already includes it
02:35 - Demonstrating the closure serialization problem
03:01 - What serialization means in PHP
04:47 - How unserialization works
05:20 - The problem with closures and serialization
05:36 - How Laravel makes closures serializable
08:03 - Bringing closures back to life
10:13 - How Laravel uses serializable closures
13:55 - How to sign a closure for security
15:01 - Preventing tampering with signed closures
16:30 - Why Laravel doesn’t always sign closures
17:28 - Wrapping up
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: