PHP (Laravel)

The PHP/Laravel SDK integration guide for APIToolkit. It monitors incoming traffic, gathers the requests and sends the request to the apitoolkit servers.


Run the following command to install the package:

composer require apitoolkit/apitoolkit-php

Set the APITOOLKIT_KEY environment variable to your API key in you .env file, should look like this:



Register the middleware in the app/Http/Kernel.php file under the correct middleware group eg api, or at the root:

	@@ -83,4 +86,6 @@ Route::get('/', function () {


  • For laravel, apitoolkit uses the cache to prevent reinitializing the sdk with each request. So make sure you have laravel cache setup for your service