我有一个视图,其中一些数据显示在带有过滤选项的表中。当我从过滤部分选择搜索选项时,我只想刷新表格部分并显示更新的数据。这意味着最近的表数据应该清除表中应显示的新过滤数据。我已经使用 Ajax 成功地从数据库中过滤了数据。但无法在表中显示过滤后的数据(Ajax 响应)。我认为如果 ajaxdata(item)可以附加到@foreach( @foreach ($loans as $loan))问题将会解决。
@extends('layouts.master')
@section('content')
{{--//Blade view--------------------------------------------------------------------------------------------------------}}
<div class="">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-lg-12 borrower_id">
<div class="pull-left">
<h2>Pending Loans</h2>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 " >
<h6>Branch</h6>
<input class="form-control" type="text" placeholder="Branch Name" aria-label="Search" id="branch_selector" name="branch_selector" value="" >
</div>
<div class="col-xs-3 col-sm-3 col-md-3" >
<h6>Center</h6>
<input class="form-control" type="text" placeholder="Center Name" aria-label="Search" id="center_selector" name="center_selector" value="" >
</div>
<div class="col-xs-3 col-sm-3 col-md-3" >
<h6>Group</h6>
<input class="form-control" type="text" placeholder="Group Number" aria-label="Search" id="group_selector" name="group_selector" value="">
</div>
<div class="col-xs-3 col-sm-3 col-md-3" >
<h6>Search</h6>
<button type="submit"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
</div>
{{-- @if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
慕侠2389804