SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $maquinas= DB::select("SELECT * from vista_delete");
  2.  foreach ($maquinas as $maquina ) {
  3.     $var = $maquina->cantidad;
  4.  
  5.     if  ($var != 1){
  6.     DB::table('tipomaquinas')->where('id','=',$id)->delete();
  7.     return redirect('consultartipo')->with('message', 'Registro eliminado!!');
  8.    }
  9.     else {
  10.  
  11.         return redirect('consultartipo')->with('error', 'el registro no esta vacio!!');
  12.       }
  13.   }
  14.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top