Urgent.News

What's breaking now, across hundreds of outlets.

Tech

A read-only SQL dashboard for Laravel

Laravel SQL Dashboard is a self-hosted dashboard in the spirit of Rails' Blazer. Your team saves SQL queries, sees results as tables and charts, and gets alerts. It is built to be safe to leave on. Package page: docs and demo . What you get Saved queries with typed variables such as {since} and {status} , bound as parameters Table results with CSV export, and line, bar or pie charts drawn as SVG…

Laravel SQL Dashboard is a self-hosted monitoring tool inspired by Rails' Blazer. It allows your team to store SQL queries, view results as tables and charts, and receive alerts. The dashboard is designed to be secure and can be left running without worry. The package page provides documentation and a demo.

With Laravel SQL Dashboard, you can save queries that include typed variables like {since} and {status}, which are treated as parameters during execution. The results are displayed as tables, and you have the option to export them to CSV. Additionally, the dashboard supports line, bar, or pie charts drawn as SVG graphics on the server.

The dashboard can host multiple queries, each with shared variables, and allows for scheduled checks every 5 minutes, hour, or day. These checks trigger mail alerts to keep your team informed. An audit log records every run, including the user who initiated it.

Safety is a priority in Laravel SQL Dashboard. It employs a dialect-aware tokenizer that allows only one SELECT or WITH statement and rejects writes, INTO, and any second statement. The database's read-only transaction further prevents writes. A connection where the user has write privileges is also denied. The dashboard is closed by default, accessible only within the local environment until you define specific gates.

By default, every page returns a 403 error outside the local environment until you set up the necessary gates. The dashboard does not operate as a sandbox and does not hide columns. To maintain security, grant the read-only user access only to the tables that your team requires.

Slack alerts are implemented but have not been thoroughly tested with real Slack. The package is installed using Composer's require command, followed by running php artisan migrate to set up the necessary database tables. The dashboard is licensed under MIT and requires PHP 8.3 or higher and Laravel 12 or 13.

The task scheduling feature of Laravel is utilized to run the scheduled checks. For more information, visit the source on GitHub.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Custom Domain Onboarding: 4 Zone Ownership Checkpoints for Merchant Migration

A merchant can own a custom domain without giving your commerce platform control of its DNS zone. To implement onboarding, establish that ownership boundary before you add the domain or write a…

  • Four zone ownership checkpoints for merchant migration
  • Platform-managed zone: add domain, persist zoneid, upsert record, schedule verification
  • Customer-managed zone: customer performs DNS change as explicit onboarding step

B2C SaaS abroad: When do you actually have to register for VAT/GST?

Getting your first customer from another country is exciting. Someone in Lisbon, whom you've never met, has decided your little SaaS product is worth €12 a month.

  • SaaS businesses selling abroad may face VAT/GST obligations in multiple countries.
  • Thresholds for tax registration vary by country, e.g., Norway and Canada have specific limits.
  • US sales tax rules are complex due to state-level economic nexus requirements.

More from Monday 23 November →