2017-10-25 28 views
0

Laravel 5.4 - TokenMismatchException - フォーム

<form class="form-horizontal" method="POST" action="/create_benchmark"> 
    {{ csrf_field() }} 
    <h2 style="margin: auto;text-align: center;" id = 'account' value='{{$account['ACCOUNTID']}}' > {{$account['Account Name']}} </h2> 
    <hr> 

    <div id='Sales' class="form-group scorecardgrouphead"> 
     <h3> Inbound Sales Sold Benchmarks </h3> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} low_up_bound"> 
     <label for="" class="col-md-4 control-label"></label> 

     <div class="col-md-6"> 
      <label for="" class="col-md-6">Lower Bound</label> 
      <label for="" class="col-md-6">Upper Bound</label> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="appointment_lead_inbound_target" class="col-md-4 control-label">Appointment/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="appointment_lead_inbound_lower" type="number" class="col-md-12 my_form-control" name="appointment_lead_inbound_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="appointment_lead_inbound_target" type="number" class="col-md-12 my_form-control" name="appointment_lead_inbound_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="shows_appointments_created_inbound_target" class="col-md-4 control-label">Shows/appointments created </label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_inbound_lower" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_inbound_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_inbound_target" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_inbound_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_lead_inbound_target" class="col-md-4 control-label">sold/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_lead_inbound_lower" type="number" class="col-md-12 my_form-control" name="sold_lead_inbound_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_lead_inbound_target" type="number" class="col-md-12 my_form-control" name="sold_lead_inbound_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_show_inbound_target" class="col-md-4 control-label">sold/show%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_show_inbound_lower" type="number" class="col-md-12 my_form-control" name="sold_show_inbound_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_show_inbound_target" type="number" class="col-md-12 my_form-control" name="sold_show_inbound_target" value='50' required> 
      </div> 
     </div> 
    </div> 
    <hr> 
    <div id='Showroom' class="form-group scorecardgrouphead"> 
     <h3> Unsold Showroom Traffic Benchmarks</h3> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} low_up_bound"> 
     <label for="" class="col-md-4 control-label"></label> 

     <div class="col-md-6"> 
      <label for="" class="col-md-6">Lower Bound</label> 
      <label for="" class="col-md-6">Upper Bound</label> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="appointment_lead_unsold_target" class="col-md-4 control-label">Appointment/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="appointment_lead_unsold_lower" type="number" class="col-md-12 my_form-control" name="appointment_lead_unsold_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="appointment_lead_unsold_target" type="number" class="col-md-12 my_form-control" name="appointment_lead_unsold_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="shows_appointments_created_unsold_target" class="col-md-4 control-label">Shows/appointments created </label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_unsold_lower" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_unsold_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_unsold_target" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_unsold_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_lead_unsold_target" class="col-md-4 control-label">sold/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_lead_unsold_lower" type="number" class="col-md-12 my_form-control" name="sold_lead_unsold_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_lead_unsold_target" type="number" class="col-md-12 my_form-control" name="sold_lead_unsold_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_show_unsold_target" class="col-md-4 control-label">sold/show%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_show_unsold_lower" type="number" class="col-md-12 my_form-control" name="sold_show_unsold_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_show_unsold_target" type="number" class="col-md-12 my_form-control" name="sold_show_unsold_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="ust_factor_unsold_target" class="col-md-4 control-label">Ust Factor</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="ust_factor_unsold_lower" type="number" class="col-md-12 my_form-control" name="ust_factor_unsold_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="ust_factor_unsold_target" type="number" class="col-md-12 my_form-control" name="ust_factor_unsold_target" value='50' required> 
      </div> 
     </div> 
    </div> 
    <hr> 
    <div id="Leads" class="form-group scorecardgrouphead"> 
     <h3> Internet Leads Benchmarks</h3> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} low_up_bound"> 
     <label for="" class="col-md-4 control-label"></label> 

     <div class="col-md-6"> 
      <label for="" class="col-md-6">Lower Bound</label> 
      <label for="" class="col-md-6">Upper Bound</label> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="appointment_lead_internet_target" class="col-md-4 control-label">Appointment/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="appointment_lead_internet_lower" type="number" class="col-md-12 my_form-control" name="appointment_lead_internet_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="appointment_lead_internet_target" type="number" class="col-md-12 my_form-control" name="appointment_lead_internet_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="shows_appointments_created_internet_target" class="col-md-4 control-label">Shows/appointments created </label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_internet_lower" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_internet_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_internet_target" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_internet_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_lead_internet_target" class="col-md-4 control-label">sold/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_lead_internet_lower" type="number" class="col-md-12 my_form-control" name="sold_lead_internet_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_lead_internet_target" type="number" class="col-md-12 my_form-control" name="sold_lead_internet_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_show_internet_target" class="col-md-4 control-label">sold/show%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_show_internet_lower" type="number" class="col-md-12 my_form-control" name="sold_show_internet_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_show_internet_target" type="number" class="col-md-12 my_form-control" name="sold_show_internet_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="response_time_internet_target" class="col-md-4 control-label">Response Time</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="response_time_internet_lower" type="number" class="col-md-12 my_form-control" name="response_time_internet_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="response_time_internet_target" type="number" class="col-md-12 my_form-control" name="response_time_internet_target" value='50' required> 
      </div> 
     </div> 
    </div> 
    <hr> 
    <div id="Retention" class="form-group scorecardgrouphead"> 
     <h3> Lease Retention Benchmarks </h3> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} low_up_bound"> 
     <label for="" class="col-md-4 control-label"></label> 

     <div class="col-md-6"> 
      <label for="" class="col-md-6">Lower Bound</label> 
      <label for="" class="col-md-6">Upper Bound</label> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="appointment_lead_lease_target" class="col-md-4 control-label">Appointment/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="appointment_lead_lease_lower" type="number" class="col-md-12 my_form-control" name="appointment_lead_lease_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="appointment_lead_lease_target" type="number" class="col-md-12 my_form-control" name="appointment_lead_lease_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="shows_appointments_created_lease_target" class="col-md-4 control-label">Shows/appointments created </label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_lease_lower" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_lease_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_lease_target" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_lease_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_lead_lease_target" class="col-md-4 control-label">sold/lead%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_lead_lease_lower" type="number" class="col-md-12 my_form-control" name="sold_lead_lease_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_lead_lease_target" type="number" class="col-md-12 my_form-control" name="sold_lead_lease_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_show_lease_target" class="col-md-4 control-label">sold/show%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_show_lease_lower" type="number" class="col-md-12 my_form-control" name="sold_show_lease_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_show_lease_target" type="number" class="col-md-12 my_form-control" name="sold_show_lease_target" value='50' required> 
      </div> 
     </div> 
    </div> 
    <hr> 
    <div id='Totals' class="form-group scorecardgrouphead"> 
     <h3> BDC Totals Benchmarks</h3> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} low_up_bound"> 
     <label for="" class="col-md-4 control-label"></label> 

     <div class="col-md-6"> 
      <label for="" class="col-md-6">Lower Bound</label> 
      <label for="" class="col-md-6">Upper Bound</label> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="shows_appointments_created_bdc_target" class="col-md-4 control-label">Shows/appointments created </label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_bdc_lower" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_bdc_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="shows_appointments_created_bdc_target" type="number" class="col-md-12 my_form-control" name="shows_appointments_created_bdc_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="sold_show_bdc_target" class="col-md-4 control-label">sold/show%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="sold_show_bdc_lower" type="number" class="col-md-12 my_form-control" name="sold_show_bdc_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="sold_show_bdc_target" type="number" class="col-md-12 my_form-control" name="sold_show_bdc_target" value='50' required> 
      </div> 
     </div> 
    </div> 
    <hr> 
    <div id='Sold' class="form-group scorecardgrouphead"> 
     <h3> Dealer Sold Benchmarks</h3> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} low_up_bound"> 
     <label for="" class="col-md-4 control-label"></label> 

     <div class="col-md-6"> 
      <label for="" class="col-md-6">Lower Bound</label> 
      <label for="" class="col-md-6">Upper Bound</label> 
     </div> 
    </div> 

    <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> 
     <label for="bdc_sold_dealer_target" class="col-md-4 control-label">BDC sold/dealer%</label> 

     <div class="row col-md-6"> 
      <div class="col-md-6"> 
       <input id="bdc_sold_dealer_lower" type="number" class="col-md-12 my_form-control" name="bdc_sold_dealer_lower" value='30' required> 
      </div> 
      <div class="col-md-6"> 
       <input id="bdc_sold_dealer_target" type="number" class="col-md-12 my_form-control" name="bdc_sold_dealer_target" value='50' required> 
      </div> 
     </div> 
    </div> 

    <hr> 
    <div class="form-group"> 
     <div class="col-md-6 col-md-offset-4"> 
      <button type="submit" class="btn btn-primary" name="save" value="save"> 
       Save 
      </button> 

      <button id="resetbutton" type="submit" class="btn btn-primary" name="reset" value="reset"> 
       Reset to autogroup 
      </button> 
     </div> 
    </div> 
</form> 

私はFirefoxでこのコードをテストする場合、それは期待どおりに動作しますが、Chromeで、それがランダムIは_tokenがフィールドであることが確認さが除きCSRFスローを次のように私はlaravel形態を有します常に送信されます。フォームとテストから他のフィールドを削除すると、Chromeでも期待どおりに動作します。私のHTMLの頭の中で

<meta name="csrf-token" content="{{ csrf_token() }}" /> 

任意の理由はこれが唯一のChromeで失敗するでしょうか?

+0

クッキーnキャッシュをクリアしてから、一度チェックしてみてください。 –

答えて

0

php artisan cacheを試すことができます:config

関連する問題