trypost/app/Http/Requests/App/Onboarding/StoreOnboardingReferralSourceRequest.php
Paulo Castellano a78f5a96ae feat(onboarding): add "where you found us" referral-source step
Adds a single-select referral-source step between the goals and connect
steps of onboarding. The choice is stored on users.referral_source and
mirrored to PostHog, mirroring the existing persona and goals steps.

- ReferralSource enum (12 sources) + nullable users.referral_source column
- referralSource()/storeReferralSource() controller actions with the same
  self-hosted, subscribed, persona and goals guards as the sibling steps
- connect() now requires a referral source before rendering
- Single-select ReferralSource.vue page mirroring the goals step
- Localized across all 15 locales
2026-07-18 16:07:11 -03:00

27 lines
538 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\App\Onboarding;
use App\Enums\User\ReferralSource;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreOnboardingReferralSourceRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'referral_source' => ['required', Rule::enum(ReferralSource::class)],
];
}
}