PHP code example of lumisys / log-viewer-bundle

1. Go to this page and download the library: Download lumisys/log-viewer-bundle 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/ */

    

lumisys / log-viewer-bundle example snippets


# /config/bundles.php
return [
    // ...
    FD\LogViewer\FDLogViewerBundle::class => ['all' => true],
];


use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return static function (RoutingConfigurator $routingConfigurator): void {
    $routingConfigurator->import('.', 'fd_symfony_log_viewer')->prefix('/log-viewer');
};

return static function (SecurityConfig $security): void {
    ...
    $security->accessControl()->path('^/log-viewer')->roles(['ROLE_ADMIN']);
};
bash
php bin/console assets:install