Example #1
0
 public function delete($id)
 {
     if (Contact::destroy($id)) {
         return redirect()->back()->with('msg', 'Контакт удален');
     }
     return redirect()->back()->with('warning', 'Не удалось удалить');
 }
Example #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     Contact::destroy($id);
     Session::flash('flash_message', 'Contact deleted!');
     return redirect('contacts');
 }