public function restore(Request $request, $id)
 {
     $opportunity = Account::withTrashed()->find($id);
     $opportunity->restore();
     Change::create(['type' => 'restore', 'subject' => 'opportunity', 'user_id' => auth()->user()->id, 'account_id' => $opportunity->account_id, 'opportunity_id' => $opportunity->id]);
     $request->session()->flash('alert-success', 'Opportunity was successfully restored!');
     return redirect()->back();
 }
Example #2
0
 public function activities($id)
 {
     return view('app.account.activities', ['account' => Account::withTrashed()->find($id)]);
 }