From e8119b763cee27b00d300e6bafa1ed453b010766 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Mon, 7 Sep 2020 21:43:48 +0100 Subject: [PATCH] Register Application observers --- .env.example | 4 ++++ app/Providers/AppServiceProvider.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.env.example b/.env.example index 4f0d539..f3c45e3 100644 --- a/.env.example +++ b/.env.example @@ -68,4 +68,8 @@ PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" +# Mostly for developers, but with Papertrail, you can easily see what the app's users are doing without relying on +# the internal log viewer. SENTRY_LARAVEL_DSN= +PAPERTRAIL_URL= +PAPERTRAIL_PORT diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index aec3e77..8d8144e 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,6 +2,8 @@ namespace App\Providers; +use App\Application; +use App\Observers\ApplicationObserver; use App\Observers\UserObserver; use App\User; use Illuminate\Support\Facades\Schema; @@ -32,7 +34,9 @@ class AppServiceProvider extends ServiceProvider ]); Schema::defaultStringLength(191); + User::observe(UserObserver::class); + Application::observe(ApplicationObserver::class); $this->app['request']->server->set('HTTPS', $this->app->environment() != 'local'); }