Guest User

Untitled

a guest
Sep 25th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <form action="{{route('Invoice.update', 'test')}}" method="post">
  2. {{method_field('patch')}}
  3. {{csrf_field()}}
  4. <input type="hidden" name="catid" id="catid" >
  5. <button type="submit" data-catid="{{$in->id}}"></button>
  6. </form>
  7.  
  8. var catid = button.data('catid')
  9. document.getElementById("catid").innerHTML = val(catid)
  10.  
  11. public function update(Request $request)
  12. {
  13. $invoice = Invoice::findOrFail($request->catid);
  14. $invoice->validate=1;
  15. $invoice->save();
  16. return back();
  17. }
  18.  
  19. Route::resource('Invoice','ValidateController');
Add Comment
Please, Sign In to add comment