LaravelPackages.net
Acme Inc.
Toggle sidebar
bakraj/databasewatcher

Laravel Package to track and monitor DB requests

15
0
0.2
About bakraj/databasewatcher

bakraj/databasewatcher is a Laravel package for laravel package to track and monitor db requests. It currently has 0 GitHub stars and 15 downloads on Packagist (latest version 0.2). Install it with composer require bakraj/databasewatcher. Discover more Laravel packages by bakraj or browse all Laravel packages to compare alternatives.

Last updated

DataBase Watcher

Laravel package to monitor database request , exposing an API to collect the usage statistics or using the package builtin view to represent the data on graphs using Chartjs.

install:

Require this package with composer using the following command:

composer require bakraj/databasewatcher

After updating composer, add the service provider to the providers array in config/app.php

$ bakraj\DataBaseWatcher\DataBaseWatcherServiceProvider::class,

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Publishing views, assets and config:

1- publishing all:

$ php artisan vendor:publish --provider="bakraj\DataBaseWatcher\DataBaseWatcherServiceProvider"

2- publishing views:

$ php artisan vendor:publish --tag=databasewatcer.views --force

3- publishing assets:

$ php artisan vendor:publish --tag=databasewatcer.assets --force

API Documentation:

over all statistics:

calling the route

/databasewatcher/overall

expected result:

{
	"stats":
	{
		"2018-07-25":121
	}
}

specific day statistics:

calling the route:

/analyze/{date}

expected result:

{
	"stats":
	{
		"hour_request":
			{
			"1":3,"2":9
			},
		"total":12
	}
}

Star History Chart