Hi Bimal, in order to work your form, you need to add hidden field to your form like: "<input type="hidden" name="_token" value="{{ Session::token() }}"> "
this is my login form sample:
<div class="col-md-6">
<h3>Sign In</h3>
<form action="{{ route('signin') }}" method="post">
<div class="form-group {{ $errors->has('email')?'has-error':'' }}">
<label for="email">Your E-Mail</label>
<input class="form-control" type="text" name="email" id="email" value="{{ Request::old('email') }}">
</div>
<div class="form-group {{ $errors->has('password')?'has-error':'' }}">
<label for="password">Your Password</label>
<input class="form-control" type="password" name="password" id="password" value="{{ Request::old('password') }}">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<input type="hidden" name="_token" value="{{ Session::token() }}">
</form>
</div>
What version of laravel are you using?
HAVE you registered the HTML facade in your config/app.php file?
Also, make sure you have "illuminate/html" in your composer.json file as this was removed from the laravel core in recent updates.
ukashka said:
Hi Bimal, in order to work your form, you need to add hidden field to your form like: "<input type="hidden" name="_token" value="{{ Session::token() }}"> "
this is my login form sample:
<div class="col-md-6"> <h3>Sign In</h3> <form action="{{ route('signin') }}" method="post"> <div class="form-group {{ $errors->has('email')?'has-error':'' }}"> <label for="email">Your E-Mail</label> <input class="form-control" type="text" name="email" id="email" value="{{ Request::old('email') }}"> </div></div><div class="form-group {{ $errors->has('password')?'has-error':'' }}"> <label for="password">Your Password</label> <input class="form-control" type="password" name="password" id="password" value="{{ Request::old('password') }}"> </div> <button type="submit" class="btn btn-primary">Submit</button> <input type="hidden" name="_token" value="{{ Session::token() }}"> </form>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community