Video
Description
Using this package you can monitor the health of your application by registering checks.
Here's an example where we'll monitor available disk space.
// typically, in a service provider use Spatie\Health\Facades\Health;use Spatie\Health\Checks\Checks\UsedDiskSpaceCheck; Health::checks([ UsedDiskSpaceCheck::new() ->warnWhenUsedSpaceIsAbovePercentage(70) ->failWhenUsedSpaceIsAbovePercentage(90),]);
When the used disk space is over 70%, then a notification with a warning will be sent. If it's above 90%, you'll get an error notification. Out of the box, the package can notify you via mail and Slack.
Related Content on Laravel Daily
Video
Recent Courses on Laravel Daily
AI Agents/IDEs for Laravel: May 2026 (Claude Code, Codex, OpenCode, etc)
7 lessons
52 min
Laravel 13 Starter Kit Teams and Customizations
10 lessons
33 min
How to Build Laravel 13 API From Scratch
30 lessons
1 h 23 min