コード例 #1
0
 public function enviarNotificacionBusquedaClientes(Request $request)
 {
     $noty = new NotificacionController();
     $pasajero = Pasajero::where('identificacion', $request['identificacion'])->where('estado', 'Asignado')->first();
     $mensaje = 'En conductor a marcado que ira a recogerte, llegara en cualquier momento.';
     if ($noty->enviarNotificacionClientes($mensaje, $request['identificacion'], 'Busqueda')) {
         $pasajero->estado = 'En busqueda';
         if ($pasajero->save()) {
             return 'true';
         } else {
             return 'false';
         }
     } else {
         return 'No es posible notificar a este cliente';
     }
 }