1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/you-can-provide-closures-into-the-default-value-in-laravels-config-helper.md
Samuel Štancl 3f631cf1d2 Week 31/2022
2022-08-06 01:03:07 +02:00

543 B

title tweet_id thread_slug author_username images created_at slug
You can provide closures into the $default value in Laravel's config helper 1555543655087099905 weekly-thread-2022-31 realstevebauman
https://pbs.twimg.com/media/FY1jGv3XgAQba6L.jpg
2022-08-05T13:18:02+00:00 you-can-provide-closures-into-the-default-value-in-laravels-config-helper

Huh, apparently you can provide closures into the $default value in Laravel's config helper. Neat! Pretty useful if you want to throw an exception if it's missing 👏