I tried to let the user enter his ID to display the payment recode I have two model Customer, payment which has one to many relations here is my form
<form action= "{{url('/Check')}}" method="POST" enctype="multipart/from-data">
@csrf
<div class="row gtr-uniform">
<h3>Please Enter youe National ID</h3>
<div class="col-6 col-12-xsmall">
<input type="text" name="cust_id" id="cust_id" value="" placeholder="ID" required/>
</div>
<!-- Break -->
<div class="col-6 col-12-xsmall">
<ul class="actions">
<li><input type="submit" id="btnclaim" value="Search" class="primary" /></li>
<li><input type="reset" value="Reset" /></li>
</ul>
</div>
</div>
</form>
this is the route statement
Route::post('/Check',[paymetController::class,'Check']);
and here is the controller
public function Check(Request $request){
$cust_id=$request->CustomerID;
$pay=Customer::with('payment')->find($cust_id);
return view('DisplayPay',compact('pay'));
}
when I submit the form I got
419 PAGE EXPIRED