PHP Classes

File: app/Http/Middleware/LoggingPackageConfig.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon DB Admin   app/Http/Middleware/LoggingPackageConfig.php   Download  
File: app/Http/Middleware/LoggingPackageConfig.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon DB Admin
Web application to manage SQL of databases
Author: By
Last change:
Date: 5 months ago
Size: 963 bytes
 

Contents

Class file image Download
<?php

namespace App\Http\Middleware;

use
Closure;
use
Illuminate\Http\Request;
use
Lagdo\DbAdmin\LoggingPackage;
use
Symfony\Component\HttpFoundation\Response;

use function
config;

class
LoggingPackageConfig
{
   
/**
     * Handle an incoming request.
     *
     * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
     */
   
public function handle(Request $request, Closure $next): Response
   
{
       
// Copy the logging options into the LoggingPackage package options.
       
config([
           
'jaxon.app.packages' => [
               
LoggingPackage::class => [
                   
'options' => config('dbadmin.logging.reader'),
                   
'database' => config('dbadmin.logging.database')
                ],
            ],
           
'jaxon.lib.core.request.uri' => '/logging/jaxon',
           
'jaxon.lib.js.app.file' => 'log-1.0.2',
        ]);

        return
$next($request);
    }
}