Skip to content

Instantly share code, notes, and snippets.

View ilvalerione's full-sized avatar
🎯
Building Inspector.dev

Valerio ilvalerione

🎯
Building Inspector.dev
View GitHub Profile
@ilvalerione
ilvalerione / commandbar.vue
Last active May 2, 2023 07:37
Programmatically open commandbar
<template>
<div class="row p-3 align-items-center bg-white">
<div class="col">
<span class="text-muted pointer" @click="openCommandBar">
<i class="bi bi-search me-3"></i>
Search for help
</span>
</div>
<div class="col-auto">
InspectorMonitoringMiddleware extends \Inspector\Laravel\Middleware\WebRequestMonitoring
{
public function terminate($request, $response)
{
parent::terminate($request, $response);
// Get what you want from the $request
inspector()->transaction()->http->request->headers = $request->headers->all();
}
}
<?php
use \Inspector\Laravel\Middleware\WebRequestMonitoring;
class InspectorFilterMonitoringMiddleware extends WebRequestMonitoring
{
/**
* Terminates a request/response cycle.
*
$trainingIn = [
[0, 0, 1],
[1, 1, 1],
[1, 0, 1],
[0, 1, 1]
];
$trainingOut = [0, 1, 1, 0];