feature: add error pages
This commit is contained in:
@@ -8,6 +8,8 @@ use App\Services\Auth\AuthService;
|
||||
use App\Services\Auth\Contracts\AuthServiceInterface;
|
||||
use App\Services\User\Contracts\UserServiceInterface;
|
||||
use App\Services\User\UserService;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -21,6 +23,17 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
if (config('app.debug')) {
|
||||
DB::listen(function ($query) {
|
||||
Log::channel('query')->info(
|
||||
sprintf(
|
||||
"[%s ms] %s | Bindings: %s",
|
||||
$query->time,
|
||||
$query->sql,
|
||||
json_encode($query->bindings)
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user