I have this on my view
{{ Form::open() }}
@if($order->paid == 0)
<button type="submit" class="btn btn-primary" value="1">Mark Order as Paid</a>
@else
<button type="submit" class="btn btn-primary" value="0">Mark Order as Unpaid</a>
@endif
{{ Form::close() }}
And this in my controller
public function ordersPaidSubmit($orderId) {
$order = Order::where('order_id', $orderId)->first();
if (!$order) {
App::abort(404);
}
$paid = Input::get('paid');
$order->save();
return Redirect::to('/admin/orders');
}
Is it possible to give value to buttons 0 or1 like this and on click to update database column? Currently doesn't update but how can be make to update?