i am trying to figure out why this error even though its fresh installation.i got this error in my project so i googled ,none of the answers worked for me.so i created new project and copied all controller ,view, and model.its worked fine after few hours once again token mismatch error.why this happen in laravel ?
my form
<form class="form-horizontal action="http://localhost/laravel/public/add-post-new" enctype="multipart/form-data" method="POST" accept-charset="UTF-8" >
<div class="form-group">
<label for="inputEmail" class="control-label col-xs-2">Title</label>
<div class="col-xs-10">
<input type="text" class="form-control" id="post_title" placeholder="Title" name="post_title">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Content</label>
<div class="col-xs-10"><textarea class="form-control" style="resize:none" rows="25" name="post_content"></textarea>
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Featured Image</label>
<div class="col-xs-10"><input type="file" class="filestyle" data-buttonText="Find" name="featured_image">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Post Images</label>
<div class="col-xs-10"><input type="file" class="filestyle" name="post_gallery[]" multiple />
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Select Category</label>
<div class="col-xs-10" >
<select class="form-control" name="cat_id">
<?php $data=Category::all(); ?>
<option value="0">Default Category</option>
@foreach($data as $value)
<option value="{{$value->id}}">{{$value->cat_name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Publish Post</label>
<div class="col-xs-10">
<label class="radio-inline">
<input type="radio" name="published" id="inlineRadio1" value="1"> Publish
</label><br>
<label class="radio-inline">
<input type="radio" name="published" id="inlineRadio2" value="2"> UnPublish
</label><br>
<label class="radio-inline">
<input type="radio" name="published" id="inlineRadio2" value="3"> Draft
</label><br><br>
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Slider Post</label>
<div class="col-xs-10">
<label class="radio-inline">
<input type="radio" name="slider_post" id="inlineRadio1" value="1"> Slider Post
</label><br>
<label class="radio-inline">
<input type="radio" name="slider_post" id="inlineRadio2" value="2"> Not required
</label><br><br>
</div>
</div>
<div class="form-group">
<div class="col-xs-offset-2 col-xs-10">
<input name="_token" type="hidden" value="{{ csrf_token() }}"/>
<button type="submit" class="btn btn-primary">Submit Post</button>
</div>
</div>
before asking question i have read many tutorial
Laravel 5, Forms, TokenMismatchException in VerifyCsrfToken.php line 46
Laravel 5 Auth Post Submit - TokenMismatchException in VerifyCsrfToken.php line 46
TokenMismatchException in VerifyCsrfToken.php line 53 in Laravel 5.1
TokenMismatchException in VerifyCsrfToken.php line 46
Laravel 5, ajax, 500 Internal Server Error, TokenMismatchException in VerifyCsrfToken.php line 46:
Laravel 5 TokenMismatchException in VerifyCsrfToken.php line 46
Encountering "TokenMismatchException in VerifyCsrfToken.php" error
Laravel TokenMismatchException
http://laravel.io/forum/01-30-2015-laravel5-tokenmismatchexception-in-verifycsrftoken
TokenMismatchException when uploading a Video?
updated: