value); } public function failedAuthorizationMessage(): string { if (!is_user_logged_in()) { return 'You must be logged in to access the dashboard.'; } return 'You do not have permission to access the dashboard.'; } public function rules() { return [ // The window every "+N" on the dashboard counts over, and the span // the activity chart draws. Omitted, the dashboard reads 30 days. 'period' => ['nullable', 'string', new InRule(['7d', '30d', '12m'])], // The Refresh button: compute now instead of reading the cached // answer, which can be a few minutes behind — see DashboardCache. 'fresh' => ['nullable', 'boolean'], ]; } }