/** * Update the specified resource in storage. * PUT /workorders/{id} * * @param int $id * @return Response */ public function update($id) { $workorder = Workorder::where('id', $id)->update(Input::all()); if ($workorder) { return ['status' => true]; } else { return ['status' => false]; } }
/** * Update the specified resource in storage. * PUT /workorders/{id} * * @param int $id * @return Response */ public function update($id) { $workorders = Workorder::where('id', $id)->update(Input::all()); if ($workorders) { return ['status' => true, 'data' => $workorders]; } else { throw new Exception("DB transaction failed"); } }