PHP code example of solution-forest / filament-goaccess
1. Go to this page and download the library: Download solution-forest/filament-goaccess 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/ */
solution-forest / filament-goaccess example snippets
use SolutionForest\FilamentGoAccess\GoAccessPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(GoAccessPlugin::make());
}
'mode' => 'managed',
'sites' => [
'default' => [
'label' => 'My site',
'log_paths' => ['/var/log/nginx/access.log'],
'json_path' => storage_path('app/goaccess/default.json'),
'db_path' => storage_path('app/goaccess/default-db'),
'log_format'=> 'COMBINED', // or null to inherit the global log_format
],
],
use Illuminate\Support\Facades\Schedule;
Schedule::command('goaccess:generate')->everyMinute()->withoutOverlapping();