public function delete($id)
 {
     $charity = Charity::findOrFail($id);
     $charity->delete();
     $this->flasher->success('Charity Deleted', 'The charity has been deleted fro the system');
     return redirect('admin/charities');
 }
 public function delete(Request $request, $id)
 {
     $video = Video::findOrFail($id);
     $video->delete();
     $this->flasher->success('Success', 'The video has been deleted.');
     return redirect('admin/videos');
 }
 public function delete($id)
 {
     $sponsor = Sponsor::findOrFail($id);
     $sponsor->delete();
     $this->flasher->success('Sponsor Deleted!', 'That sponsor has been deleted');
     return redirect('admin/sponsors');
 }
 public function update($id, EditableContentFormRequest $request)
 {
     $editable = EditableArea::findOrFail($id);
     $editable->update($request->all());
     $this->flasher->success('Content Saved', 'Your editorial changes have been persisted');
     return redirect('admin/content/pages/' . $editable->page->name);
 }
 public function delete($id)
 {
     $article = Article::findOrFail($id);
     if (Gate::denies('manage-article', $article)) {
         return abort('403');
     }
     $article->delete();
     $this->flasher->success('Post Deleted', 'That post has been permanently removed');
     return redirect('admin/blog');
 }
 public function setTeam($id, Request $request)
 {
     $teamIds = collect($request->team_member)->map(function ($item) {
         return intval($item);
     })->toArray();
     $expedition = Expedition::findOrFail($id);
     $expedition->syncTeamMembers($teamIds);
     $this->flasher->success('Team Members Set', 'The team for this expedition has been updated');
     return redirect('admin/expeditions/' . $expedition->id);
 }
 public function delete($id)
 {
     $profile = Profile::findOrFail($id);
     if (Gate::denies('manage-profile', $profile)) {
         return abort(403);
     }
     $profile->delete();
     $this->flasher->success('Profile Deleted', 'The profile has been deleted.');
     return redirect('admin');
 }
 public function delete(Request $request, $id)
 {
     if (!$request->user()->hasRole('admin')) {
         return abort(403, 'You do not have permission to perform that action');
     }
     $member = TeamMember::findOrFail($id);
     $member->delete();
     $this->flasher->success('Team Member Deleted', 'The team member was successfully removed from the team');
     return redirect('admin/team');
 }
 public function doPasswordReset(PasswordResetFormRequest $request)
 {
     if (!Hash::check($request->current_password, $request->user()->password)) {
         return redirect()->back();
     }
     $user = User::findOrFail($request->user()->id);
     $user->password = $request->password;
     $user->save();
     $this->flasher->success('Password Reset', 'Your password has been reset');
     return redirect('admin');
 }