Created
March 11, 2017 15:10
-
-
Save segun6060/99fad1b8a625326d57e6d0e3edecc552 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function confirma(Request $request) | |
{ | |
// | |
$this->validate($request, array( | |
'name' => 'required|max:255', | |
'amount' => 'required', | |
)); | |
$confirm = new Confirm; | |
$confirm ->name = $request->name; | |
$confirm ->amount = $request->amount; | |
$user = User::whereName('name')->first(); | |
$user->status = 2; | |
$user->save(); | |
$confirm ->save(); | |
Session::flash('success','Confirmation sent succesfully please wait for 5mins and refresh !'); | |
return redirect(''); | |
//return redirect::to('home'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="/confirma" method="POST" class="form-inline"> | |
<a href="#"> | |
{{ csrf_field() }} | |
<div class="form-group hideform" style="display:none;"> | |
<input name="name" value="{{$collector->name }}" class="form-control" type="text" required="" /> | |
</div> | |
<div class="form-group hideform" style="display:none;"> | |
<input name="amount" value="{{$collector->amount }}" class="form-control" type="text" required="" /> | |
</div> | |
<div class="form-group"> | |
<input type="submit" class="btn btn-success pull-right" value="Comfirm"> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment