@include('Partials.sidebar')
@include('Partials.header')

Platform Leads

Developers interested in joining the platform

  1. ›
  2. Leads
@foreach(['success','error'] as $t) @if(session($t))
{{ session($t) }}
@endif @endforeach
@foreach([ ['Total', $stats['total'], '#6c757d'], ['New', $stats['new'], '#3b82f6'], ['Contacted', $stats['contacted'], '#f59e0b'], ['Demo Scheduled', $stats['demo_scheduled'], '#8b5cf6'], ['Converted', $stats['converted'], '#22c55e'], ['Not Interested', $stats['not_interested'], '#ef4444'], ] as [$label, $val, $color])
{{ $label }}
{{ $val }}
@endforeach
@forelse($leads as $lead) @empty @endforelse
Company Contact City / Country Projects Status Received Actions
{{ $lead->company_name }} @if($lead->website)
{{ $lead->website }} @endif
{{ $lead->contact_name }}
{{ $lead->email }}
{{ $lead->city ?? '—' }}{{ $lead->country ? ', '.$lead->country : '' }} {{ $lead->num_projects ?? '—' }} {{ $lead->getStatusLabel() }} {{ $lead->created_at->diffForHumans() }} @if($lead->status !== 'converted') @endif
No leads found.
@if($leads->hasPages()) @endif
{{-- ── API Integration Panel ──────────────────────────────────── --}}
Landing Page API Integration Click to expand — give this to your marketing site developer
{{-- Endpoint --}}
POST — accepts JSON body · rate limited to 5 req/min per IP
X-Landing-Key — only enforced if LANDING_API_KEY is set in your .env. If unset, the endpoint accepts requests without a key.
{{-- Fields table --}}
@foreach([ ['company_name', 'string', '✅ Yes', 'Name of the developer / company enquiring'], ['contact_name', 'string', '✅ Yes', 'Person submitting the enquiry'], ['email', 'string', '✅ Yes', 'Contact email address'], ['phone', 'string', 'No', 'Phone number (without country code)'], ['country_code', 'string', 'No', 'Default +91. e.g. +971, +44'], ['city', 'string', 'No', 'City'], ['country', 'string', 'No', 'Country'], ['num_projects', 'number', 'No', 'Approx. number of projects they manage'], ['website', 'string', 'No', 'Company website URL'], ['message', 'string', 'No', 'Free-text message from the lead'], ['utm_source', 'string', 'No', 'e.g. google, linkedin, referral'], ['utm_medium', 'string', 'No', 'e.g. cpc, email, organic'], ['utm_campaign', 'string', 'No', 'Campaign name'], ['landing_page', 'string', 'No', 'Identifier for the page (e.g. pricing-page)'], ] as [$f,$t,$r,$d]) @endforeach
Field Type Required Description
{{ $f }} {{ $t }} {{ $r }} {{ $d }}
{{-- Response format --}}
{
  "success": true,
  "message": "Thank you! Our team will reach out to you shortly."
}
Returns 200 (same body) instead of 201 if a lead with the same email was already submitted in the last 24h — treated as a duplicate, not an error.
// 401 — bad/missing X-Landing-Key (only if LANDING_API_KEY is set)
{ "error": "Unauthorized." }

// 422 — validation failed
{ "message": "The company name field is required.", "errors": {...} }

// 429 — rate limited
{ "error": "Too many submissions. Try again in 45 seconds." }
{{-- Code tabs --}}
async function submitPlatformLead(data) {
  const res = await fetch('{{ url('/api/platform-leads') }}', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-Landing-Key': 'YOUR_API_KEY_HERE', // omit if LANDING_API_KEY is unset
    },
    body: JSON.stringify({
      company_name: data.company_name,   // required
      contact_name: data.contact_name,   // required
      email:        data.email,          // required
      phone:        data.phone,
      country_code: '+91',
      city:         data.city,
      country:      data.country,
      num_projects: data.num_projects,
      website:      data.website,
      message:      data.message,
      utm_source:   new URLSearchParams(location.search).get('utm_source'),
      utm_medium:   new URLSearchParams(location.search).get('utm_medium'),
      utm_campaign: new URLSearchParams(location.search).get('utm_campaign'),
      landing_page: 'your-page-name-here',
    }),
  });
  const json = await res.json();
  if (res.ok) alert(json.message);
}
{{-- /code tabs --}}
{{-- /card-body --}}
{{-- /collapse --}}
@include('Partials.footer')