Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/09/2013, 07:57
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
Respuesta: Como procesar formularlo en laravel 4

eternoaprendiz gracias por responder , hice lo que me indicas pero obtengo un error

Código PHP:
Ver original
  1. Route::get('recuperar', function()
  2. {
  3.     return View::make('recuperacion');
  4. });
  5.  
  6.  
  7. Route::post('recuperar', array('before' => 'csrf', function()
  8. {
  9.     $data = Input::get('correo');
  10.     $data2 = DB::table('users')
  11.     ->select('email')
  12.     ->where('email', $data)->first();
  13.  
  14.  if ($data2) {
  15.            
  16.      Mail::send("send-email", $data2, function($message)
  17.     {
  18.         $message->from('[email protected]', 'desde');
  19.         $message->to('[email protected]', 'para')->subject('Recuperación Contraseña');
  20.     });
  21.    
  22.     }
  23.    
  24.     return View::make("inicio", array("data2" => $data2));
  25.  
  26. }));

este es el error que obtengo
Cita:
Argument 2 passed to Illuminate\Mail\Mailer::send() must be of the type array, object given, called in /var/www/html/volcano/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 183 and defined