Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eusonlito/laravelpulsedatabasetablessize
A Laravel Pulse card to show Database Tables Size
https://github.com/eusonlito/laravelpulsedatabasetablessize
Last synced: 6 days ago
JSON representation
A Laravel Pulse card to show Database Tables Size
- Host: GitHub
- URL: https://github.com/eusonlito/laravelpulsedatabasetablessize
- Owner: eusonlito
- License: mit
- Created: 2024-02-05T12:45:03.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-02-05T22:33:22.000Z (9 months ago)
- Last Synced: 2024-10-18T04:23:08.143Z (26 days ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DatabaseTablesSize card for Laravel Pulse
This card will show you database tables size.
![Screenshot from 2024-02-05 13-43-42](https://github.com/eusonlito/LaravelPulseDatabaseTablesSize/assets/644551/21f71ca7-019a-41c4-a148-f5e28c9d86c2)
## Installation
Require the package with Composer:
```shell
composer require eusonlito/laravel-pulse-database-tables-size:dev-master
```## Register the recorder
```diff
return [
// ...
'recorders' => [
+ \EuSonLito\LaravelPulse\DatabaseTablesSize\Recorders\DatabaseTablesSizeRecorder::class => [
+ 'enabled' => env('PULSE_DATABASE_TABLES_SIZE_ENABLED', true),
+ 'schedule' => env('PULSE_DATABASE_TABLES_SIZE_SCHEDULE', 60), // refresh time in minutes
+ 'connections' => [env('DB_CONNECTION', 'mysql')],
+ 'ignore' => [
+ '#^/pulse$#', // Pulse dashboard...
+ ],
+ ],
]
]
```You also need to be running [the `pulse:check` command](https://laravel.com/docs/10.x/pulse#dashboard-cards).
## Add to your dashboard
To add the card to the Pulse dashboard, you must first [publish the vendor view](https://laravel.com/docs/10.x/pulse#dashboard-customization).
Then, you can modify the `dashboard.blade.php` file:
```diff
+
```
That's it!