Пример #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $revenue = Revenue::find($id);
     Revenue::destroy($id);
     Session::flash('message', 'Revenue successfully deleted!');
     return redirect(route('project.show', $revenue->project_id));
 }
Пример #2
0
 public function api_update(Request $request)
 {
     $r = Revenue::find($request->input('id'));
     $r->amount_paid = (double) $request->input('amount_paid');
     $r->contract_id = $request->input('contract_id');
     $r->currency = 'GBP';
     $r->save();
     return response("Updated");
 }