Skip to main content

7 posts tagged with "filament"

View All Tags

· 6 min read
Alexis Fraudita
Ronald Pereira
Wilson Velasco

We present version 1.2.0 of the MoonGuard Filament Plugin! With this new update, we have added functionality to monitor the performance and health of your applications in production.

This functionality allows tracking of key indicators such as CPU load, RAM usage, and hard disk storage space.

This monitoring feature is crucial to ensure the efficiency and stability of your applications in production, allowing you to identify potential bottlenecks in performance and take corrective measures before they affect your users.

· 3 min read
Wilson Velasco
Alexis Fraudita

Looking to improve the user experience of MoonGuard Filament Plugin, we realized that the only way to know when a site is under maintenance is by reviewing its configuration, which motivated us to add an indicator in the "sites stats" of the dashboard, we also contemplated that there was no mechanism that would allow us to eliminate very old exceptions in the database, those that occurred a long time ago and that we could consider as irrelevant information.

In this article we will explore how we add the functionality.

Adding maintenance indicator

Normally we use these site stats to visualize the uptime, ssl-certificate and number of exceptions that our sites have, so we had the idea to improve this by adding an indicator of when the sites are under maintenance.

on-maintenance-1.png

To achieve this, we update our Filament widget site-stats-widget.blade.php by adding a conditional that is executed when there is a date of the down_for_maintenance_at property of the site model.

on-maintenance-2.png

We also updated the widget components uptime-list-item.blade.php, performance-list-item.blade.php and certificate-list- item.blade.php so that they are not activated when in maintenance in order not to confuse us and improve the user experience.

The final result was the following.

on-maintenance-3.png

These small details are what polish and improve the user experience using MoonGuard.

If you want to see more detailed code you can see the PR on Github.

Add command to clean exceptions

We have a productive MoonGuard in which we have been testing its functionalities for the last 2-3 months with real projects and we realized that we needed a way to clean (automatically) very old exceptions that were no longer relevant, so we decided to create a new command and schedule it in the server scheduler to run periodically.

We created the command DeleteOldExceptionCommand , where all those exceptions that are older than the time specified in the MoonGuard configuration are deleted periodically:

  class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule)
{
$schedule->command(DeleteOldExceptionCommand::class)->everyMinute();
}

//...
}

This command works similar to the other MoonGuard commands (The CheckUptimeCommand and CheckSslCertificateCommand) you can schedule the execution of this command or use the MoonGuardCommandsScheduler if you want to schedule these three commands:

protected function schedule(Schedule $schedule): void
{
MoonGuardCommandsScheduler::scheduleMoonGuardCommands(
$schedule,
'* * * * *', // <-- Uptime Check Cron
'* * * * *', //<-- SSL Certificate Check Cron
'* * * * *' //<-- [Optional] Delete Exceptions Cron
);
}

For more information on programming these commands you can visit the MoonGuard documentation.

You can also read in detail the related changes in this PR on GitHub.

If you want to learn more about MoonGuard Filament Plugin, we invite you to read our book MoonGuard: The Software Creator's Journey V2 where we talk in detail about how we created each of the MoonGuard features as a Filament v3 plugin.

If you want to learn more about MoonGuard you can visit the page, follow us on Twitter/X and join our discord community for more information.

· 2 min read
Alexis Fraudita

Since the last release of the MoonGuard Filament Plugin, we have been updating our tool to make it more useful for Laravel developers.

On this occasion, we realized within MoonGuard's internal Slack channel that we were not receiving notifications for exceptions from different team projects, and we were also receiving duplicate notifications for uptime and SSL-certificate.

In this post, we want to tell you how we solved these issues and what we learned.

· 2 min read
Alexis Fraudita

In previous versions of the MoonGuard Filament Plugin, the team used Slack notifications to monitor different internal applications and test features of the MoonGuard package. However, these notifications were configured to be sent repeatedly to the same channel for each registered user, which presented a problem.

· 3 min read
Luis Güette
Francismar Suarez
Ronald Pereira
Wilson Velasco
Alexis Fraudita

We have been working on this for months and now we are excited to introduce the MoonGuard ecosystem, a stack of tools designed to improve your development experience in local and monitor your Laravel applications in production.

· 6 min read
Luis Güette

Recently, I had to create a simple settings page to manage general settings for a website with Filament. Filament is a Laravel-based admin panel that provides an intuitive interface for managing your application's data.

In this blog post, I'll walk you through the steps I took to create the settings page, including how to use migrations to store the data, how to update the settings from the Filament admin panel, and how to dynamically build the edit form depending on the setting type.