Example #1
18
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Events::destroy($id);
     \Toastr::error('You have deleted that event', $title = 'Deleted', ["showDuration" => "3000"]);
     return redirect('events');
 }
Example #2
2
 public function update(Request $request, $slug, $date, $id)
 {
     $cita = Cita::find($id);
     $cita->fill($request->all());
     $cita->capturado_por = \Auth::user()->id;
     $cita->fecha = fecha_ymd($request->fecha);
     $medico = Medico::findBySlug($slug);
     $total_citas = Cita::getTotalCitasCount($medico->id, $cita->fecha);
     if ($total_citas) {
         Toastr::error('Error al asignar Cita, Agenda del dia: ' . fecha_dmy($cita->fecha) . ' llena');
         return redirect()->route('admin.citas.show', ['slug' => $slug, 'date' => $request->date]);
     } else {
         $cita->save();
     }
     //Toastr::success('Cita actualizada exitosamente');
     alert()->success('Exitosamente!!!', 'Cita re-agendada');
     return redirect()->route('admin.citas.show', ['slug' => $request->slug, 'date' => $date]);
 }
 public function multi(Request $request)
 {
     $ids = $request->input('ids');
     Customers::whereIn('id', $ids)->delete();
     \Toastr::error('You deleted customers', $title = 'Deleted', ["showDuration" => "3000"]);
     return ['status' => true];
 }
Example #4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Tasks::destroy($id);
     \Toastr::error('Task deleted', 'Success');
     return redirect('/tasks');
 }
 public function multi()
 {
     $action = Input::get('action');
     $choice = Input::get('choice');
     if ($action == 'delete') {
         $participants = Participant::whereIn('thread_id', $choice)->where('user_id', \Auth::id())->delete();
         $messages = Message::whereIn('thread_id', $choice)->where('user_id', \Auth::id())->delete();
         \Toastr::error('You have removed yourself from these threads', $title = 'Deleted', ["showDuration" => "3000"]);
         return redirect('messages');
     }
 }