@extends('layouts.main')
@section('main-container')
| S.No# |
Census Codes |
State Name |
S.No# |
Census Codes |
State Name |
@php $i = 1;@endphp
@foreach($states as $state)
@if($i % 2 == 1) {{-- Start new row for every first item in a pair --}}
@endif
| {{ $i }} |
{{ $state->id }} |
{{ $state->name }} |
@if($i % 2 == 0) {{-- Close row for every second item in a pair --}}
@endif
@php $i++; @endphp
@endforeach
{{-- If the last row is incomplete (odd number of states), close it --}}
@if($i % 2 == 1)
|
|
@endif
@endsection