+
+ // Bind and provide the default system user as a singleton to the app instance when needed.
+ // This effectively "caches" fetching the user at an app-instance level.
+ $this->app->singleton('users.default', function () {
+ return User::query()->where('system_name', '=', 'public')->first();
+ });