-1
這是我的代碼,它給出了這樣的Laravel角JS:語法錯誤,意外「>」
錯誤「FatalErrorException在40c069d0d4c87feb028bacb0d3340515線92 語法錯誤,意外‘>’」
什麼都要我做?請參閱下面的附件。謝謝。
@extends('master')
@section('content')
<style>
.table-condensed > tbody > tr > td {
padding: 5px !important;
}
.daterangepicker_input input[type="text"]{
padding: 0 6px 0 28px !important;
min-height: 0 !important;
}
table td{border:none !important;}
</style>
<div class="row" ng-app="reportsApp" ng-controller="reportsController">
<div class="col-md-12">
<div class="span12">
<div class="grid simple">
<div class="grid-title noPrint">
<h4>Missing POs</h4>
</div>
<div class="grid-body">
{!! Form::open(['method'=>'POST', 'url'=>['report/missingPOs']]) !!}
<div class="form-row row col-md-12 noPrint">
<div class="col-md-5" style="padding: 0;">
<div class="col-md-12 input-append success form-group" style="padding: 0;">
<div class="col-md-5" style="float: left;">
{!! Form::text('range',null, ['class'=>'form-control','style'=>'width:170px','id'=>'range']) !!}
{!! Form::hidden('from', null,['id'=>'from']) !!}
{!! Form::hidden('to', null,['id'=>'to']) !!}
<span class="add-on">
> <span class="arrow"></span>
> <i class="fa fa-th"></i>
> </span>
> </div>
> <div class="col-md-6" style="float: left;">
> @if(isset($mpo['regions_id']))
> {!! Form::select('regions_id',$regions,$mpo['regions_id']) !!}
> @else
> {!! Form::select('regions_id',$regions,null) !!}
> @endif
> </div>
> <div class="col-md-1">
> {!! Form::submit('Search',['class'=>'btn btn-success btn-cons']) !!}
> </div>
>
> </div>
> </div>
> </div>
> {!! Form::close() !!}
>
> <h4 class="semi-bold doPrint" >Missing POs</h4>
> @if(isset($mpo))
> <div>
> <h4>
> Report period: {!! $mpo['from'] !!} to {!! $mpo['to'] !!}
> </h4>
> <h4>
> Region: {!! $selectedRegion !!}
> </h4>
> </div>
> @endif
> <table class="table table-hover table-condensed" id="example">
> <thead>
> <tr>
> <th data-hide="phone,tablet" style="width:20%">Region</th>
> <th style="width:10%" data-hide="phone,tablet">Brand</th>
> <th style="width:10%">Store</th>
> <th style="width:10%" data-hide="phone,tablet">Date</th>
> <th style="width:10%" data-hide="phone,tablet">Shift Time</th>
> <th style="width:10%" data-hide="phone,tablet">Consultant</th>
> </tr>
> </thead>
> <tbody>
> <?php
> $cr = '';
> ?>
> @if (isset($results))
> @foreach ($results as $key=>$r)
> <tr style="<?php if ($cr != $r->regionName) echo "border-top:1px solid #ddd !important;" ?>">
> <?php ?>
> <td>{{$r - > regionName}}, {{$r - > regionSubName}}</td>
> <td>{{$r - > brandName}}</td>
> <td>{{$r - > storeName}}</td>
> <td>{{$r - > sDate}}</td>
> <td>{{$r - > sStart.'-'.$r - > sEnd}}</td>
> <td>{{$r - > fName.' '.$r - > lName}}</td>
> <?php
> $cr = $r->regionName;
> ?>
> </tr>
> @endforeach
> @endif
> </tbody>
> </table>
> </div>
> </div>
> </div>
> </div>
> </div>
>
>
> @stop
>
> @section('content')
> <script>
> $(function() {
> function cb(start, end) {
> $("#from").val(start.format('DD-MM-YYYY'))
> $("#to").val(end.format('DD-MM-YYYY'))
> }
> cb(<?php echo (isset($mpo['from'])) ? 'moment("' . $mpo['from'] . '", "DD-MM-YYYY")' : 'moment().subtract(7, "days")'
> ?>,<?php echo (isset($mpo['to'])) ? 'moment("' . $mpo['to'] . '",
> "DD-MM-YYYY")' : 'moment()' ?>);
> $('input[name="range"]').daterangepicker({
> locale: {
> format: 'DD-MM-YYYY'
> },
> startDate: <?php echo (isset($mpo['from'])) ? 'moment("' . $mpo['from'] . '", "DD-MM-YYYY")' : 'moment().subtract(7,
> "days")' ?>,
> endDate: <?php echo (isset($mpo['to'])) ? 'moment("' . $mpo['to'] . '", "DD-MM-YYYY")' : 'moment()' ?>
> }, cb)
> });
> </script>
@append
{{$ R - > regionName}}我不知道你在做什麼試圖在這裏做,但你可能想要改變那些 - >到 - >像這樣︰$ r-> regionName –
否我只是想調用一個函數將這些數據導出到Excel。所以我試圖做到這一點使用angularJS – TharinduC