Change payment status buttons gives error "Creating default object..."
<p>I'm trying to make 2 buttons with <code>Mars as Paid</code> and <code>Mark as Unpaid</code> values 1/0. </p>

<p>When I click on button I've got error:</p>

<pre><code>Creating default object from empty value
</code></pre>

<p>What is wrong with the code? I know it can be write more 'intelligent'.
Here is the controller</p>

<pre><code>public function ordersPaidSubmit($orderId) {

$order = Order::where('order_id', $orderId)-&gt;first();
    if (!$order) {
        App::abort(404);
}
    $paid-&gt;paid = Input::get('paid');
    $order-&gt;save();

    return Redirect::to('/orders')-&gt;with('message', '');
}
</code></pre>

<p>And here is view buttons</p>

<pre><code>{{ Form::open() }}
    @if($order-&gt;paid = 0)
        &lt;button type="submit" class="btn btn-primary" name="paid" id="paid" value="1"&gt;Mark Order as Paid&lt;/button&gt; 
    @else
            &lt;button type="submit" class="btn btn-primary" name="paid" id="paid" value="0"&gt;Mark Order as Unpaid&lt;/button&gt;
    @endif
{{ Form::close() }}
</code></pre>