PHP code example of robsontenorio / lighthouse-dashboard
1. Go to this page and download the library: Download robsontenorio/lighthouse-dashboard 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/ */
robsontenorio / lighthouse-dashboard example snippets
// config/lighthouse-dashboard.php
return [
/**
* Authenticated user attribute for identify the current client.
*
* If there is no authenticated user a `anonymous` will be used.
* Default is `Auth::user()->username`
*/
'client_identifier' => 'username',
/**
* Database connection name for the dashboard.
*
* By default it uses different connection. You must create it.
* Or set it to `null` if want to use same connection from target app.
*/
'connection' => 'dashboard',
];
use Nuwave\Lighthouse\Events\ManipulateResult;
abstract class TestCase extends BaseTestCase
{
// use this Trait
use DisableDashboardMetrics;
public function setUp(): void
{
parent::setUp();
// Then, disable metrics while testing
$this->withoutDashboardMetrics();
}
}
return [
/**
* Authenticated user attribute for identify the current client.
*
* If there is no authenticated user a `anonymous` will be used.
* Default is `Auth::user()->username`
*/
'client_identifier' => 'username',
/**
* Database connection name for the dashboard.
*
* By default it uses different connection. You must create it.
* Or set it to `null` if want to use same connection from target app.
*/
'connection' => 'dashboard',
/**
* Silent tracing.
*
* This package auto-register TracingServiceProvider from "nuwave/lighthouse".
* This is a