Add additional metadata to your events to make them easier to debug.
use Illuminate\Support\Facades\Context; Context::add('locale', App::currentLocale()); Context::add('user', [ 'role' => Auth::user()->role, 'subscription_tier' => Auth::user()->subscription_tier, ]);
use Illuminate\Support\Facades\Context; use Laravel\Pennant\Feature; Context::add('feature_flags', [ 'new_dashboard' => Feature::active('new_dashboard'), 'enhanced_search' => Feature::active('enhanced_search'), 'beta_checkout' => Feature::active('beta_checkout'), ]);
use Illuminate\Support\Facades\Context; Context::add('tenant', [ 'id' => $tenant->id, 'name' => $tenant->name, 'plan' => $tenant->subscription_plan, 'region' => $tenant->region, ]);
Was this page helpful?