the browser-facing portion of osu!
at master 2.2 kB view raw
1<?php 2 3return [ 4 /* 5 * Enable or disable the query detection. 6 * If this is set to "null", the app.debug config value will be used. 7 */ 8 'enabled' => env('QUERY_DETECTOR_ENABLED', null), 9 10 /* 11 * Threshold level for the N+1 query detection. If a relation query will be 12 * executed more then this amount, the detector will notify you about it. 13 */ 14 'threshold' => 1, 15 16 /* 17 * Here you can whitelist model relations. 18 * 19 * Right now, you need to define the model relation both as the class name and the attribute name on the model. 20 * So if an "Author" model would have a "posts" relation that points to a "Post" class, you need to add both 21 * the "posts" attribute and the "Post::class", since the relation can get resolved in multiple ways. 22 */ 23 'except' => [ 24 //Author::class => [ 25 // Post::class, 26 // 'posts', 27 //] 28 ], 29 30 /* 31 * Define the output format that you want to use. Multiple classes are supported. 32 * Available options are: 33 * 34 * Alert: 35 * Displays an alert on the website 36 * \BeyondCode\QueryDetector\Outputs\Alert::class 37 * 38 * Console: 39 * Writes the N+1 queries into your browsers console log 40 * \BeyondCode\QueryDetector\Outputs\Console::class 41 * 42 * Clockwork: (make sure you have the itsgoingd/clockwork package installed) 43 * Writes the N+1 queries warnings to Clockwork log 44 * \BeyondCode\QueryDetector\Outputs\Clockwork::class 45 * 46 * Debugbar: (make sure you have the barryvdh/laravel-debugbar package installed) 47 * Writes the N+1 queries into a custom messages collector of Debugbar 48 * \BeyondCode\QueryDetector\Outputs\Debugbar::class 49 * 50 * JSON: 51 * Writes the N+1 queries into the response body of your JSON responses 52 * \BeyondCode\QueryDetector\Outputs\Json::class 53 * 54 * Log: 55 * Writes the N+1 queries into the Laravel.log file 56 * \BeyondCode\QueryDetector\Outputs\Log::class 57 */ 58 'output' => [ 59 \BeyondCode\QueryDetector\Outputs\Log::class, 60 \BeyondCode\QueryDetector\Outputs\Clockwork::class, 61 ], 62];