public function pedidouser() { $usuario = User::where('username', '=', Input::get('username'))->first(); $ultimo = Pedidos::ultimopedido($usuario->username)->take(1)->get(); return Response::json($ultimo); }