You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
872 B
PHTML

2 years ago
<?php
namespace App\Providers;
2 years ago
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
2 years ago
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
2 years ago
if (app()->isProduction() == false) {
DB::listen(function ($query) {
Log::info(
$query->sql,
[
'bindings' => $query->bindings,
'time' => $query->time,
'connectionName' => $query->connectionName
]
);
});
}
2 years ago
}
}