Register Application observers

This commit is contained in:
Miguel Nogueira 2020-09-07 21:43:48 +01:00
parent 04838048ce
commit e8119b763c
2 changed files with 8 additions and 0 deletions

View File

@ -68,4 +68,8 @@ PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 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= SENTRY_LARAVEL_DSN=
PAPERTRAIL_URL=
PAPERTRAIL_PORT

View File

@ -2,6 +2,8 @@
namespace App\Providers; namespace App\Providers;
use App\Application;
use App\Observers\ApplicationObserver;
use App\Observers\UserObserver; use App\Observers\UserObserver;
use App\User; use App\User;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
@ -32,7 +34,9 @@ class AppServiceProvider extends ServiceProvider
]); ]);
Schema::defaultStringLength(191); Schema::defaultStringLength(191);
User::observe(UserObserver::class); User::observe(UserObserver::class);
Application::observe(ApplicationObserver::class);
$this->app['request']->server->set('HTTPS', $this->app->environment() != 'local'); $this->app['request']->server->set('HTTPS', $this->app->environment() != 'local');
} }