1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 21:34:03 +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

11 lines
No EOL
543 B
Markdown

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