예제 #1
0
 /**
  * Remove the specified Email from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $email = $this->emailRepository->find($id);
     if (empty($email)) {
         Flash::error('Email not found');
         return redirect(route('emails.index'));
     }
     $this->emailRepository->delete($id);
     Flash::success('Email deleted successfully.');
     return redirect(route('emails.index'));
 }