• Czas czytania ~1 min
  • 24.08.2022

Laravel Statystyki tras to pakiet @bilfeldt, aby rejestrować statystyki dotyczące wykorzystania tras przez użytkowników i zespoły w aplikacji Laravel. Ten pakiet umożliwia:

  • See how much each user uses the application and what part of the application they use
  • See if any unauthenticated users are making a lot of requests to your application

Korzystając z oprogramowania pośredniego Laravel, pakiet umożliwia globalne włączenie rejestrowania tras lub można je włączyć dla poszczególnych grup tras i tras za pośrednictwem oprogramowania pośredniczącego:

Route::middleware(['routestatistics'])
    ->get('/example', /* ... */);

Na koniec możesz nawet włączyć logowanie za pomocą makra żądania:

public function index(Request $request)
{
    $request->routeStatistics();
    // ...
    return view('example');
}

Ten pakiet domyślnie rejestruje żądania w bazie danych z następującymi polami:

  • user_id - the user id if authenticated
  • team_id - the team id associated with the request (if available)
  • method - the HTTP method
  • route - the route name (if available) or the route URI
  • status - the HTTP status code
  • ip - the request IP
  • date - the date of the request stored as a datetime
< p>Możesz dowiedzieć się więcej o tym pakiecie, uzyskać pełne instrukcje instalacji i wyświetlić kod źródłowy na GitHub.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

O

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

O autorze CrazyBoy49z
WORK EXPERIENCE
Kontakt
Ukraine, Lutsk
+380979856297