@extends('layouts.app') @section('title', 'Soil Test Dashboard - Blackberry Farm') @section('content')
๐Ÿงช New Soil Test ๐Ÿ“Š Dashboard โ† Operations
{{ $soilTests->total() ?? 0 }}
Total Soil Tests
{{ $testsThisYear ?? 0 }}
Tests This Year
{{ $averagePH ?? 'N/A' }}
Average pH
{{ $upcomingTests ?? 0 }}
Follow-ups Due
๐ŸŒฑ Latest pH Reading

@if(isset($latestTest) && $latestTest->ph_level) {{ $latestTest->ph_level }} @php $ph = $latestTest->ph_level; if ($ph >= 5.5 && $ph <= 6.5) { $status = 'Ideal for Blackberries'; $class = 'ph-ideal'; } elseif ($ph < 5.5) { $status = 'Too Acidic'; $class = 'ph-low'; } else { $status = 'Too Alkaline'; $class = 'ph-high'; } @endphp {{ $status }} @else No recent pH tests @endif

๐Ÿ’ฐ Testing Investment

${{ number_format($totalTestCost ?? 0, 2) }} total testing cost

Average: ${{ number_format($averageTestCost ?? 0, 2) }} per test

๐Ÿ“… Next Recommended Test

@if(isset($nextTestDue) && $nextTestDue) {{ \Carbon\Carbon::parse($nextTestDue)->format('M j, Y') }}
{{ \Carbon\Carbon::parse($nextTestDue)->diffForHumans() }} @else Schedule annual soil test @endif

Clear
@if(isset($soilTests) && $soilTests->count() > 0) @foreach($soilTests as $test) @endforeach
Test Date Location pH Level NPK (N-P-K) Organic Matter Overall Rating Lab/Method Follow-up Actions
{{ \Carbon\Carbon::parse($test->test_date)->format('M j, Y') }} {{ $test->location }} @if($test->ph_level) {{ $test->ph_level }} @php $ph = $test->ph_level; if ($ph >= 5.5 && $ph <= 6.5) { $phClass = 'ph-ideal'; } elseif ($ph < 5.5) { $phClass = 'ph-low'; } else { $phClass = 'ph-high'; } @endphp @if($ph >= 5.5 && $ph <= 6.5) โœ“ @elseif($ph < 5.5) โ†“ @else โ†‘ @endif @else - @endif @if($test->nitrogen_ppm || $test->phosphorus_ppm || $test->potassium_ppm) {{ $test->nitrogen_ppm ?? '-' }}-{{ $test->phosphorus_ppm ?? '-' }}-{{ $test->potassium_ppm ?? '-' }} @else - @endif @if($test->organic_matter_percent) {{ $test->organic_matter_percent }}% @if($test->organic_matter_percent >= 5) โ— @elseif($test->organic_matter_percent >= 3) โ— @else โ— @endif @else - @endif @if($test->overall_rating) @php $rating = $test->overall_rating; $badgeClass = match($rating) { 'excellent' => 'badge-success', 'good' => 'badge-info', 'fair' => 'badge-warning', 'poor' => 'badge-danger', default => 'badge-secondary' }; @endphp {{ ucfirst($rating) }} @else - @endif {{ $test->lab_name ?? 'Unknown' }}
{{ ucwords(str_replace('_', ' ', $test->test_method ?? '')) }}
@if($test->follow_up_date) @php $followUp = \Carbon\Carbon::parse($test->follow_up_date); $isOverdue = $followUp->isPast(); $isDueSoon = $followUp->diffInDays(now()) <= 30; @endphp {{ $followUp->format('M j, Y') }} @if($isOverdue) (Overdue) @elseif($isDueSoon) (Due Soon) @endif @else - @endif View
@if(method_exists($soilTests, 'links')) @endif @else

๐Ÿงช No soil test results found

Start monitoring your soil health with regular testing to ensure optimal growing conditions.

Record First Soil Test
@endif @endsection