vendredi 29 avril 2016

Php laravel TokenMismatchException request

am try to send request by post form from but error TokenMismatchException

here is my controller code

public function postSaveedit(Request $request) {
    $var1 = $request->input('title'); //name on the form
    $var2 = $request->input('meaning'); //name on the form
    $words = User::where("title", $var1)->update(array("meaning" => $var2));

    return view('dict.watch', compact('words'));
}

here is view code.

<form class="form-horizontal" role="form" method="POST" action="">
    <div class="form-group">
      <label class="col-lg-3 control-label">Title:</label>
      <div class="col-lg-8">
        <input class="form-control" value='' type="text" name="title">
      </div>
    </div>
    <div class="form-group">
      <label class="col-lg-3 control-label">Meaning:</label>
      <div class="col-lg-8">
        <input class="form-control" value="" type="text" name="meaning">
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-3 control-label"></label>
      <div class="col-md-8">
        <input class="btn btn-primary" value="Save Changes" type="submit">
        <span></span>

      </div>
    </div>
  </form>

thnak you for your help



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1O26fdv
via IFTTT

Aucun commentaire:

Enregistrer un commentaire