@include('filament.pages.astrology.partials.styles') {{ $this->form }} @if ($apiCall) @include('filament.pages.astrology.partials.api-call') @endif @if ($result) @php $timezone = $result['location']['timezone'] ?? config('astrology.default_timezone'); /** "06:51 AM", or "11:19 PM, 14 Jan" when the instant falls on a day other than $day. */ $time = function (?string $iso, ?string $day = null) use ($timezone): string { if ($iso === null || $iso === '') { return '—'; } $moment = \Carbon\CarbonImmutable::parse($iso)->setTimezone($timezone); return $moment->format('h:i A').($day === null || $moment->format('Y-m-d') === $day ? '' : $moment->format(', j M')); }; $range = fn (?array $window, ?string $day = null): string => $window ? $time($window['start'] ?? null, $day).' – '.$time($window['end'] ?? null, $day) : '—'; $scoreTone = fn (int $score, bool $vetoed): string => match (true) { $vetoed => 'vp-bad', $score >= 80 => 'vp-good', $score >= 60 => 'vp-amber', default => 'vp-bad', }; $shubhWindows = [ 'brahma_muhurta' => 'Brahma Muhurta', 'pratah_sandhya' => 'Pratah Sandhya', 'vijay_muhurta' => 'Vijay Muhurta', 'godhuli_muhurta' => 'Godhuli Muhurta', 'sayahna_sandhya' => 'Sayahna Sandhya', 'nishita_muhurta' => 'Nishita Muhurta', ]; $shubhLists = [ 'amrit_kalam' => 'Amrit Kalam', 'sarvartha_siddhi_yoga' => 'Sarvartha Siddhi Yoga', 'amrita_siddhi_yoga' => 'Amrita Siddhi Yoga', ]; $filter = $result['filter'] ?? []; @endphp
{{-- Summary --}}

{{ $result['purpose_label'] }}

Muhurta Results

{{ \Carbon\CarbonImmutable::parse($result['date_range']['start'])->format('j M Y') }} → {{ \Carbon\CarbonImmutable::parse($result['date_range']['end'])->format('j M Y') }} Days scanned {{ $result['date_range']['days_scanned'] }} Matches found {{ $result['total_matches'] }} Minimum score {{ $filter['min_score'] ?? '—' }} @if (! empty($filter['native_rashi'])) Birth rashi {{ $filter['native_rashi'] }} @endif @if (! empty($filter['native_nakshatra'])) Birth nakshatra {{ $filter['native_nakshatra'] }} @endif {{ $timezone }}
@if (empty($result['muhurtas']))

No auspicious days found for this purpose in the selected range. Try a longer range or a lower minimum score; the table below shows why each day was rejected.

@endif {{-- One card per recommended day --}} @foreach ($result['muhurtas'] ?? [] as $muhurta) @php($day = $muhurta['date'])

{{ $muhurta['weekday'] }}

{{ \Carbon\CarbonImmutable::parse($day)->format('j F Y') }}

{{ $muhurta['tithi'] }} · {{ str_replace(' Paksha', '', $muhurta['paksha']) }} · {{ $muhurta['nakshatra'] }} · Moon in {{ $muhurta['moon_rashi'] }}

{{ $muhurta['score'] }}/100
@if (! empty($muhurta['muhurta_window']))

Muhurta window

{{ $range($muhurta['muhurta_window'], $day) }}

@endif

Abhijit

{{ $range($muhurta['abhijit'] ?? null, $day) }}

Rahu Kalam

{{ $range($muhurta['rahu_kalam'] ?? null, $day) }}

Sunrise – Sunset

{{ $time($muhurta['sunrise'] ?? null, $day) }} – {{ $time($muhurta['sunset'] ?? null, $day) }}

Favourable timings

@if (array_key_exists($day, $favourableTimings)) @else @endif
@if (array_key_exists($day, $favourableTimings))
@forelse ($favourableTimings[$day] as $window)
{{ $window['lagna'] ?? '—' }} {{ $time($window['start'], $day) }} – {{ $time($window['end'], $day) }} {{ intdiv($window['minutes'], 60) ? intdiv($window['minutes'], 60).'h ' : '' }}{{ $window['minutes'] % 60 }}m {{ $window['category'] === 'highly-auspicious' ? 'Highly Auspicious' : 'Auspicious' }}
@empty

No favourable span of 30 minutes or more on this day

@endforelse
@endif

Shubh Muhurat

@foreach ($shubhWindows as $key => $label) @if (! empty($muhurta[$key]))

{{ $label }}

{{ $range($muhurta[$key], $day) }}

@endif @endforeach @foreach ($shubhLists as $key => $label) @foreach ($muhurta[$key] ?? [] as $window)

{{ $label }}

{{ $range($window, $day) }}

@if (! empty($window['nakshatra']))

{{ $window['nakshatra'] }}

@endif
@endforeach @endforeach

Why it is favourable

    @forelse ($muhurta['reasons'] ?? [] as $reason)
  • {{ $reason }}
  • @empty
  • —
  • @endforelse

Cautions

    @forelse ($muhurta['cautions'] ?? [] as $caution)
  • {{ $caution }}
  • @empty
  • None
  • @endforelse
@endforeach {{-- Every scanned day, so rejected days can be checked too --}} @if (! empty($result['all_days']))

All Scanned Days

Score and reasons for every day in the range
@foreach ($result['all_days'] as $scanned) @endforeach
DateScoreTithiNakshatraMoonReasonsCautions
{{ \Carbon\CarbonImmutable::parse($scanned['date'])->format('d M Y') }}
{{ $scanned['weekday'] }}
{{ $scanned['score'] }} @if ($scanned['vetoed'])
Rejected@endif
{{ $scanned['tithi'] }} {{ $scanned['nakshatra'] }} {{ $scanned['moon_rashi'] }} {{ implode('; ', $scanned['reasons'] ?? []) ?: '—' }} {{ implode('; ', $scanned['cautions'] ?? []) }}
@endif
@include('filament.pages.astrology.partials.raw-json') @endif