datatables.min.js:111 Uncaught TypeError: Cannot read property 'mData' of undefined .i uselaravel

datatables.min.js:111 Uncaught TypeError: Cannot read property 'mData' of undefined .i uselaravel

azharomarazharomar Posts: 2Questions: 1Answers: 0
edited February 2016 in Free community support

@extends('master')
@section('content')
{!! Html::script('/assets/js/jquery-2.2.0.js') !!}

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/t/dt/jq-2.2.0,dt-1.10.11/datatables.min.css"/>

<link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/assets/css/bootstrap-horizon.
<section class="panel ">
<div class="panel-heading"> <a href="/competitions/create" class="btn btn-primary"style="margin-bottom: 20px;">أضافه مسابقه جديده</a>

</div>

<div class="panel-body">
<div class="table-responsive">
<table class="table table-hover table-bordered" id="competitions">
<theah>
<tr>
<th>ID </th>
<th>كود</th>
<th>الأسم </th>
<th>المحافظه</th>
<th>المده</th>
<th>تاريخ البدء</th>
<th>تاريخ االانتهاء</th>
<th>الجوائز المحدده </th>
<th>العمليات</th>
</tr>
</theah>
<tbody>
@foreach($competitions as $item)
<tr>
<td> {{$item->Competitions_Id}}</td>
<td> {{$item->Code}} </td>
<td> {{$item->Name}} </td>
<td> {{$item->Government}} </td>
<td> {{$item->Period}}</td>
<td> {{$item->Start_Date}} </td>
<td> {{$item->End_Date}} </td>
<td>
@foreach($item->;awards as $items)
{{$items->pivot->Total_Amount}} {{$items->Name}}
@endforeach
</td>

        <td>

          <a href="/competitions/{{$item->Competitions_Id}}" class="btn btn-info"> عرض  </a>
          <a href="/competitions/{{$item->Competitions_Id}}/edit" class="btn btn-success">تعديل</a>
          <a href="/competitions/destroy/{{$item->Competitions_Id}}" class="btn btn-danger">حذف </a>



          </td>

</tr>
@endforeach

</tbody>

</table>

</div>
</section>
</div>

$(document).ready(function(){ $('#competitions').DataTable( { select:true, "order":[[0,"desc"]], "scrollY":"380px", "scrollCollapse":true, "paging" :true, "bproccessing":true }); });

@stop

Answers

  • azharomarazharomar Posts: 2Questions: 1Answers: 0

    how i can solve this error

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page], if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

This discussion has been closed.