/**
  * Delete the manager.
  *
  * @param int $id Manager Id
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function destroy($id)
 {
     $manager = Manager::findOrFail($id);
     $manager->delete();
     flash()->success(trans('admin::messages.success'), trans('admin::messages.manager.deleted'), 2000);
     return redirect()->back();
 }
 /**
  * Update manager's profile.
  *
  * @param Manager $manager
  * @param Request $request
  */
 public function updateManager(Manager $manager, Request $request)
 {
     if ($request->email != $manager->email) {
         $manager->email = $request->email;
     }
     //        if ($request->avatar) {
     //            if ($manager->avatar) {
     //                $this->deleteAvatarFile($manager);
     //            }
     //
     //            $manager->avatar = $this->makeAvatarFromFile($request->avatar);
     //            $manager->avatar_thumbnail = $this->makeAvatarFromFile($request->avatar, true);
     //        }
     if ($request->password) {
         $manager->password = bcrypt($request->password);
     }
     $manager->name = $request->name;
     $manager->phone = $request->phone;
     $manager->save();
     event('manager.update_profile', $manager);
 }