1. Go to this page and download the library: Download finity-labs/fin-sentinel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
finity-labs / fin-sentinel example snippets
use FinityLabs\FinSentinel\FinSentinelPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FinSentinelPlugin::make(),
]);
}
FinSentinelPlugin::make()
->navigationGroup('Monitoring') // string, UnitEnum, Closure, or null
->navigationSort(10) // ?int
->canAccess(fn () => auth()->user()?->is_admin) // restrict access without Shield
->settingsCluster(MySettingsCluster::class) // move settings to a custom cluster
use FinityLabs\FinSentinel\Facades\FinSentinel;
// Quick one-liner -- sends to the configured recipients
FinSentinel::debug($user);
// With a custom subject
FinSentinel::debug($order, 'Order inspection');
// Fluent builder for full control
FinSentinel::debug($cart)
->subject('Cart contents')
->to('[email protected]')
->send();
use FinityLabs\FinSentinel\Events\SentinelDebug;
SentinelDebug::dispatch($data, 'Optional subject');