# DataEntryController location chain fix

Your log shows the current `validateVictimLocationChain()` method is querying all possible column names in one SQL statement:

```sql
where `districts_id` = ? or `district_id` = ? or `districtid` = ?
```

This fails when one candidate column does not exist. Replace the body of the current method with:

```php
protected function validateVictimLocationChain(\Illuminate\Http\Request $request): void
{
    app(\App\Services\Core\ColumnAwareLocationChainValidator::class)->assertValid(
        (int) $request->input('districtid'),
        (int) $request->input('subcountyid'),
        (int) $request->input('parishid')
    );
}
```

Alternatively, add this trait to `DataEntryController`:

```php
use App\Http\Controllers\Concerns\UsesColumnAwareLocationValidation;

class DataEntryController extends Controller
{
    use UsesColumnAwareLocationValidation;
}
```

Do not leave the old query that references columns without checking `Schema::hasColumn()` first.
