Laravel应用程序中的致命错误异常

时间:2016-01-15 20:49:11

标签: php laravel-5.1

我在Laravel 5.1应用程序中遇到此问题。 PHP版本是5.6.16 我做错了什么?

  

d4c2ea460399317ac416d4c481ae27fb第75行中的FatalErrorException:语法错误,意外')',期待标识符(T_STRING)或变量(T_VARIABLE)或' {'或者' $'

<?php $__env->startSection('content'); ?>
<?php /**/ usort($tableGrid, "SiteHelpers::_sort") /**/ ?>

<div class="page-content row">
  <!-- Page header -->
  <div class="page-header">
    <div class="page-title">
      <h3> <?php echo e($pageTitle); ?> <small><?php echo e($pageNote); ?></small></h3>
    </div>

    <ul class="breadcrumb">
      <li><a href="<?php echo e(URL::to('dashboard')); ?>"> Dashboard </a>
      </li>
      <li class="active">
        <?php echo e($pageTitle); ?>
      </li>
    </ul>
  </div>


  <div class="page-content-wrapper m-t">

    <div class="sbox animated fadeInRight">
      <div class="sbox-title">
        <h5> <i class="fa fa-table"></i> </h5>
        <div class="sbox-tools">
          <a href="<?php echo e(url($pageModule)); ?>" class="btn btn-xs btn-white tips" title="Clear Search"><i class="fa fa-trash-o"></i> Clear Search </a>
          <?php if(Session::get( 'gid')==1): ?>
          <a href="<?php echo e(URL::to('sximo/module/config/'.$pageModule)); ?>" class="btn btn-xs btn-white tips" title=" <?php echo e(Lang::get('core.btn_config')); ?>"><i class="fa fa-cog"></i></a>
          <?php endif; ?>
        </div>
      </div>
      <div class="sbox-content">
        <div class="toolbar-line ">
          <?php if($access[ 'is_add']==1): ?>
          <a href="<?php echo e(URL::to('regate/update')); ?>" class="tips btn btn-sm btn-white" title="<?php echo e(Lang::get('core.btn_create')); ?>">
            <i class="fa fa-plus-circle "></i>&nbsp;
            <?php echo e(Lang::get( 'core.btn_create')); ?>
          </a>
          <?php endif; ?>
          <?php if($access[ 'is_remove']==1): ?>
          <a href="javascript://ajax" onclick="SximoDelete();" class="tips btn btn-sm btn-white" title="<?php echo e(Lang::get('core.btn_remove')); ?>">
            <i class="fa fa-minus-circle "></i>&nbsp;
            <?php echo e(Lang::get( 'core.btn_remove')); ?>
          </a>
          <?php endif; ?>
          <a href="<?php echo e(URL::to( 'regate/search')); ?>" class="btn btn-sm btn-white" onclick="SximoModal(this.href,'Advance Search'); return false;"><i class="fa fa-search"></i> Search</a>    
          <?php if($access[ 'is_excel']==1): ?>
          <a href="<?php echo e(URL::to('regate/download?return='.$return)); ?>" class="tips btn btn-sm btn-white" title="<?php echo e(Lang::get('core.btn_download')); ?>">
            <i class="fa fa-download"></i>&nbsp;
            <?php echo e(Lang::get( 'core.btn_download')); ?>
          </a>
          <?php endif; ?>

        </div>



        <?php echo Form::open(array( 'url'=>'regate/delete/', 'class'=>'form-horizontal' ,'id' =>'SximoTable' )); ?>

        <div class="table-responsive" style="min-height:300px;">
          <table class="table table-striped ">
            <thead>
              <tr>
                <th class="number">No</th>
                <th>
                  <input type="checkbox" class="checkall" />
                </th>

                <?php foreach($tableGrid as $t): ?>
                <?php if($t[ 'view']=='1' ): ?>
                <?php $limited=i sset($t[ 'limited']) ? $t[ 'limited'] : ''; ?>
                <?php if(SiteHelpers::filterColumn($limited )): ?>

                <th>
                  <?php echo e($t[ 'label']); ?>
                </th>
                <?php endif; ?>
                <?php endif; ?>
                <?php endforeach; ?>
                <th width="70">
                  <?php echo e(Lang::get( 'core.btn_action')); ?>
                </th>
              </tr>
            </thead>

            <tbody>
              <?php foreach($rowData as $row): ?>
              <tr>
                <td width="30">
                  <?php echo e(++$i); ?>
                </td>
                <td width="50">
                  <input type="checkbox" class="ids" name="ids[]" value='<?php echo e($row->); ?>' />
                </td>
                <?php foreach($tableGrid as $field): ?>
                <?php if($field[ 'view']=='1' ): ?>
                <?php $limited=i sset($field[ 'limited']) ? $field[ 'limited'] : ''; ?>
                <?php if(SiteHelpers::filterColumn($limited )): ?>
                <td>
                  <?php if($field[ 'attribute'][ 'image'][ 'active']=='1' ): ?>
                  <?php echo SiteHelpers::showUploadedFile($row->$field['field'],$field['attribute']['image']['path']); ?>

                  <?php else: ?>
                  <?php /**/ $conn=( isset($field[ 'conn']) ? $field[ 'conn'] : array() ) /**/ ?>
                  <?php echo SiteHelpers::gridDisplay($row->$field['field'],$field['field'],$conn); ?>
                  <?php endif; ?>
                </td>
                <?php endif; ?>
                <?php endif; ?>
                <?php endforeach; ?>
                <td>
                  <?php if($access[ 'is_detail']==1): ?>
                  <a href="<?php echo e(URL::to('regate/show/'.$row->.'?return='.$return)); ?>" class="tips btn btn-xs btn-primary" title="<?php echo e(Lang::get('core.btn_view')); ?>"><i class="fa  fa-search "></i></a>
                  <?php endif; ?>
                  <?php if($access[ 'is_edit']==1): ?>
                  <a href="<?php echo e(URL::to('regate/update/'.$row->.'?return='.$return)); ?>" class="tips btn btn-xs btn-success" title="<?php echo e(Lang::get('core.btn_edit')); ?>"><i class="fa fa-edit "></i></a>
                  <?php endif; ?>


                </td>
              </tr>

              <?php endforeach; ?>

            </tbody>

          </table>
          <input type="hidden" name="md" value="" />
        </div>
        <?php echo Form::close(); ?>

        <?php echo $__env->make('footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      </div>
    </div>
  </div>
</div>

<script>
  $(document).ready(function() {

    $('.do-quick-search').click(function() {
      $('#SximoTable').attr('action', '<?php echo e(URL::to("regate/multisearch")); ?>');
      $('#SximoTable').submit();
    });

  });
</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

View code on Pastebin

1 个答案:

答案 0 :(得分:0)

由于模块使用的表中缺少主键,可能会发生此类错误。因此,请检查您的表是否具有主键。如果没有,请创建它,然后再次创建模块。